Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public MouseWheelLogicalScrollBehavior(MouseWheelScrollClient scrollClient, IDisposable manipulator)
            : base(scrollClient, manipulator)
        {
            var element = Client.Controller.Element;

            if (scrollClient.Orientation == Orientation.Vertical)
            {
                Debouncing      = MouseWheel.GetLogicalVScrollDebouncing(element);
                ScrollIncrement = MouseWheel.GetLogicalVScrollIncrement(element);
                MouseWheel.LogicalVScrollDebouncingProperty.AddValueChanged(element, OnDebouncingYChanged);
                MouseWheel.LogicalVScrollIncrementProperty.AddValueChanged(element, OnVScrollIncrementChanged);
            }
            else
            {
                Debouncing      = MouseWheel.GetLogicalHScrollDebouncing(element);
                ScrollIncrement = MouseWheel.GetLogicalHScrollIncrement(element);
                MouseWheel.LogicalHScrollDebouncingProperty.AddValueChanged(element, OnDebouncingXChanged);
                MouseWheel.LogicalHScrollIncrementProperty.AddValueChanged(element, OnHScrollIncrementChanged);
            }
        }
Ejemplo n.º 3
0
 private void   OnDebouncingYChanged(object sender, EventArgs e)
 {
     Debouncing = MouseWheel.GetLogicalVScrollDebouncing(sender as DependencyObject);
 }