Ejemplo n.º 1
0
        void RootVisualMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (_mode == Mode.None ||
                _mode == Mode.Pin)
            {
                return;
            }

            var list = new List <ITouchPoint>();

            if (_mode == Mode.Pan)
            {
                _primaryPoint = e.GetPosition(_element);
                var primaryTouchPoint = new TouchPointWrapper(
                    _primaryPoint, TouchAction.Up, PrimaryId);
                list.Add(primaryTouchPoint);

                _mode = Mode.None;
            }
            else if (_mode == Mode.Multi)
            {
                var primaryTouchPoint = new TouchPointWrapper(
                    _primaryPoint, TouchAction.Up, PrimaryId);
                list.Add(primaryTouchPoint);

                var secondaryPoint = new TouchPointWrapper(
                    e.GetPosition(_element), TouchAction.Up, SecondaryId);
                list.Add(secondaryPoint);

                _mode = Mode.None;
            }

            _processor.Process(list);
            _behavior.HandleMockDebugInfoAndFingers(list, list[0]);
        }
Ejemplo n.º 2
0
        void TouchFrameReported(object sender, TouchFrameEventArgs e)
        {
            if (!AssociatedObject.DesiredSize.Equals(new Size(0, 0))) //Code Fix by Devix: enables Multi-Page support
            {
                _processor.Process(e.GetTouchPoints(AssociatedObject));

#if DEBUG
                HandleDebugInfoAndFingers(
                    e.GetTouchPoints(RootVisual),
                    e.GetPrimaryTouchPoint(RootVisual));
#endif
            }
        }