Exemplo n.º 1
0
 public MouseWheelSmoothScrollBehavior(MouseWheelScrollClient scrollClient, IDisposable manipulator, IMotionFilter motionFilter)
     : base(scrollClient, manipulator)
 {
     _motionSmoothing = new MotionSmoothingTarget(motionFilter)
     {
         Next = this, Precision = SinkToNormalized(0.1)
     };
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        public MouseWheelPhysicalScrollBehavior(MouseWheelScrollClient scrollClient, IDisposable manipulator)
            : base(scrollClient, manipulator)
        {
            var element = Client.Controller.Element;

            if (scrollClient.Orientation == Orientation.Vertical)
            {
                Debouncing      = MouseWheel.GetPhysicalVScrollDebouncing(element);
                ScrollIncrement = MouseWheel.GetPhysicalVScrollIncrement(element);
                MouseWheel.PhysicalVScrollDebouncingProperty.AddValueChanged(element, OnDebouncingYChanged);
                MouseWheel.PhysicalVScrollIncrementProperty.AddValueChanged(element, OnVScrollIncrementChanged);
            }
            else
            {
                Debouncing      = MouseWheel.GetPhysicalHScrollDebouncing(element);
                ScrollIncrement = MouseWheel.GetPhysicalHScrollIncrement(element);
                MouseWheel.PhysicalHScrollDebouncingProperty.AddValueChanged(element, OnDebouncingXChanged);
                MouseWheel.PhysicalHScrollIncrementProperty.AddValueChanged(element, OnHScrollIncrementChanged);
            }
        }