protected override void ExecuteScrollCommand(ScrollCommandKind command) { var commandOrientation = ScrollViewUtils.GetCommandOrientation(command); var orientation = Orientation; var orientedViewport = Viewport.AsOriented(orientation); var orientedExtent = Extent.AsOriented(orientation); var orientedOffset = Offset.AsOriented(orientation); var directScrollView = new OrientedScrollView(orientation, orientedViewport.Direct, orientedExtent.Direct, orientedOffset.Direct); var indirectScrollView = new OrientedScrollView(orientation.Rotate(), orientedViewport.Indirect, orientedExtent.Indirect, orientedOffset.Indirect); directScrollView.ExecuteScrollCommand(command, commandOrientation == orientation ? ScrollViewUtils.DefaultUnitSmallChange : ScrollViewUtils.DefaultPixelSmallChange, commandOrientation == orientation ? ScrollViewUtils.DefaultUnitWheelChange : ScrollViewUtils.DefaultPixelWheelChange); indirectScrollView.ExecuteScrollCommand(command, commandOrientation != orientation ? ScrollViewUtils.DefaultUnitSmallChange : ScrollViewUtils.DefaultPixelSmallChange, commandOrientation != orientation ? ScrollViewUtils.DefaultUnitWheelChange : ScrollViewUtils.DefaultPixelWheelChange); orientedOffset.Direct = directScrollView.Offset; orientedOffset.Indirect = indirectScrollView.Offset; Offset = orientedOffset.Vector; }