Ejemplo n.º 1
0
 protected override void OnMouseMove(MouseEventArgs e)
 {
     base.OnMouseMove(e);
     if (ParentPresenter != null)
     {
         ParentPresenter.OnHeaderMouseMove(e);
     }
     e.Handled = true;
 }
        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonUp(e);

            if (ClickMode == ClickMode.Hover && IsMouseCaptured)
            {
                ReleaseMouseCapture();
            }

            ParentPresenter.OnHeaderMouseLeftButtonUp(e);
            e.Handled = true;
        }
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonDown(e);

            // If clickmode is hover then during the mouse move the hover events will be sent
            // all the headers in the path. To avoid that we are using a capture
            if (ClickMode == ClickMode.Hover && e.ButtonState == MouseButtonState.Pressed)
            {
                CaptureMouse();
            }

            ParentPresenter.OnHeaderMouseLeftButtonDown(e);
            e.Handled = true;
        }
 protected override void OnLostMouseCapture(MouseEventArgs e)
 {
     base.OnLostMouseCapture(e);
     ParentPresenter.OnHeaderLostMouseCapture(e);
     e.Handled = true;
 }