Esempio n. 1
0
        private bool MouseUp(IMouseDevice device, IInputRoot root, Point p, MouseButton button, InputModifiers inputModifiers)
        {
            var hit = HitTest(root, p);

            if (hit != null)
            {
                var source = GetSource(hit);
                var e      = new PointerReleasedEventArgs
                {
                    Device         = this,
                    RoutedEvent    = InputElement.PointerReleasedEvent,
                    Source         = source,
                    MouseButton    = button,
                    InputModifiers = inputModifiers
                };

                source?.RaiseEvent(e);
                return(e.Handled);
            }

            return(false);
        }
Esempio n. 2
0
        private bool MouseUp(IMouseDevice device, IInputRoot root, Point p, MouseButton button, InputModifiers inputModifiers)
        {
            var hit = HitTest(root, p);

            if (hit != null)
            {
                var source = GetSource(hit);
                var e = new PointerReleasedEventArgs
                {
                    Device = this,
                    RoutedEvent = InputElement.PointerReleasedEvent,
                    Source = source,
                    MouseButton = button,
                    InputModifiers = inputModifiers
                };

                source?.RaiseEvent(e);
                return e.Handled;
            }

            return false;
        }