public MouseWheelFlowDocumentPageViewerScrollBehavior(IMouseWheelClient client)
            : base(client, null)
        {
            var element = Client.Controller.Element;

            NestedMotionEnabled = MouseWheel.GetNestedVScroll(element);
            Debouncing          = MouseWheel.GetLogicalVScrollDebouncing(element);
            MouseWheel.NestedVScrollProperty.AddValueChanged(element, OnNestedVScrollChanged);
            MouseWheel.LogicalVScrollDebouncingProperty.AddValueChanged(element, OnDebouncingYChanged);
        }
        public MouseWheelScrollBehavior(MouseWheelScrollClient scrollClient, IDisposable manipulator)
            : base(scrollClient, manipulator)
        {
            var element = Client.Controller.Element;

            if (scrollClient.Orientation == Orientation.Vertical)
            {
                NestedMotionEnabled = MouseWheel.GetNestedVScroll(element);
                MouseWheel.NestedVScrollProperty.AddValueChanged(element, OnNestedVScrollChanged);
            }
            else
            {
                NestedMotionEnabled = MouseWheel.GetNestedHScroll(element);
                MouseWheel.NestedHScrollProperty.AddValueChanged(element, OnNestedHScrollChanged);
            }
        }
 private void OnNestedVScrollChanged(object sender, EventArgs e)
 {
     NestedMotionEnabled = MouseWheel.GetNestedVScroll(sender as DependencyObject);
 }