Beispiel #1
0
        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
        {
            e.Handled = true;
            this.ReleaseMouseCapture();

            if (this.IsPressed)
            {
                this.IsPressed = false;
                this.OnClick();
            }
        }
Beispiel #2
0
 protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
 {
     this.IsPressed = true;
     e.Handled = true;
     this.CaptureMouse();
 }
Beispiel #3
0
 protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
 {
     this.CaretIndex = this.textBoxView.FormattedText.GetCaretIndex(e.GetPosition(this.textBoxView));
 }
Beispiel #4
0
 protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
 {
     Grid templateRoot = (Grid)this.FindName("templateRoot");
     Border checkBoxBorder = (Border)this.FindName("checkBoxBorder");
     Grid markGrid = (Grid)this.FindName("markGrid");
 }
Beispiel #5
0
 protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
 {
     // TODO: This should be listening to the Mouse.MouseDown event for all mouse clicks.
     // TODO: Should not close popup when click is on popup.
     this.IsOpen = false;
 }
Beispiel #6
0
        private bool ProcessRawMouseEvent(RawMouseEventArgs input)
        {
            MouseEventArgs e = null;

            switch (input.Type)
            {
                case RawMouseEventType.Move:
                    e = new MouseEventArgs(this, input.Timestamp);
                    e.RoutedEvent = UIElement.MouseMoveEvent;
                    break;

                case RawMouseEventType.LeftButtonDown:
                    e = new MouseButtonEventArgs(this, input.Timestamp);
                    e.RoutedEvent = UIElement.MouseLeftButtonDownEvent;
                    break;

                case RawMouseEventType.LeftButtonUp:
                    e = new MouseButtonEventArgs(this, input.Timestamp);
                    e.RoutedEvent = UIElement.MouseLeftButtonUpEvent;
                    break;
            }

            if (e != null)
            {
                InputManager.Current.ProcessInput(e);
                return true;
            }
            else
            {
                return false;
            }
        }
Beispiel #7
0
 protected virtual void OnMouseLeftButtonUp(MouseButtonEventArgs e)
 {
 }