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
770
Hide center docking indicator programmatically
posted

Hello,

When I'm dragging a certain pane over another pane, I would like to hide the center indicator in order to prevent users to dock this way. 

For the moment, I only succeded in preventing the drop with this chunk of code (on the PaneDragOver event), which works well :


private void ultraDockManager1_PaneDragOver(object sender, Infragistics.Windows.DockManager.Events.PaneDragOverEventArgs e)

        {

            if (e.DragAction is AddToGroupAction)

            {

                e.IsValidDragAction = false;

                e.Cursor = Cursors.No;

            }

            if (e.DragAction is NewTabGroupAction)

            {

                if ((e.DragAction as NewTabGroupAction).Pane.Name.Contains("Navigateur") && e.Panes.Count > 0 && e.Panes[0].Name.Contains("Navigateur"))

                    return;               

                e.IsValidDragAction = false;

                e.Cursor = Cursors.No;

            }

            if (e.DragAction is NewSplitPaneAction)

            {

                e.IsValidDragAction = false;

                e.Cursor = Cursors.No;

            }

        }


The cursor is then showed as a crossed circle, preventing the drop.

But the users would prefer not to see the center indicator than see it disabled. Is there any way of hiding this control ? (only the center one, not the others)

 

Many thanks in advance,

Thomas