예제 #1
0
        /// <exclude />
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonDown(e);
            if (e.Handled)
            {
                return;
            }

            if (WindowControl.BeginDrag(this, this, e))
            {
                return;
            }

            if (!DockManager.CanDrag(e))
            {
                return;
            }

            if (e.ClickCount == 1 && WindowState != WindowState.Maximized)
            {
                DockManager.BeginDrag(this, this, e);
                e.Handled = true;
            }
            else if (e.ClickCount == 2)
            {
                e.Handled = DockCommands.Execute(this, DoubleClickCommand);
            }
        }
예제 #2
0
        /// <exclude />
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonDown(e);
            if (e.Handled || !DockManager.CanDrag(e))
                return;

            if (e.ClickCount == 1)
            {
                DockManager.BeginDrag(this, this, e);
                e.Handled = true;
            }
            else if (e.ClickCount == 2)
                e.Handled = DockCommands.Execute(this, DoubleClickCommand);
        }
예제 #3
0
        /// <exclude />
        protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseRightButtonDown(e);
            if (e.Handled || !DockManager.CanDrag(e))
            {
                return;
            }

            if (FloatingWindow.CountOfVisiblePanes == 1)
            {
                Point       pt   = e.GetPosition(this);
                ContextMenu menu = FloatingWindow.FirstVisiblePane.SelectedItem.TabContextMenu;
                if (menu != null)
                {
                    menu.Placement          = PlacementMode.RelativePoint;
                    menu.PlacementRectangle = new Rect(pt, new Size(0, 0));
                    menu.PlacementTarget    = this;
                    menu.IsOpen             = true;
                }
                e.Handled = true;
            }
        }