Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
How to stop flyout of a content pane
posted

How to stop flyout of a unpinned content pane when mouse is hovered in it.

 

  • 54937
    Offline posted

    If you're just trying to prevent the flyout when the mouse is over the unpinned tab item then you can register an event handler for the PreviewMouseMove event of the PaneTabItem and mark it handled when the pane is unpinned.
    E.g.

            static DialogWindow()
            {
                EventManager.RegisterClassHandler(typeof(PaneTabItem), Mouse.PreviewMouseMoveEvent, new MouseEventHandler(OnPaneTabItemPreviewMouseMove));
            }
     
            private static void OnPaneTabItemPreviewMouseMove(object sender, MouseEventArgs e)
            {
                PaneTabItem tab = (PaneTabItem)sender;
     
                if (XamDockManager.GetPaneLocation(tab) == PaneLocation.Unpinned)
                    e.Handled = true;
            }

    You may also want to submit a suggestion for adding this as a property setting.