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;
if (e.DragAction is NewSplitPaneAction)
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
Hello Thomas,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Yes it works great !
I adapted a bit the code to completely hide the center DockingIndicator (rather than just hiding the center card panel) :
protected void DockingIndicator_Loaded(object sender, RoutedEventArgs e)
DockingIndicator di = sender as DockingIndicator; if (di == null) return; if (di.Position == DockingIndicatorPosition.Center) di.Visibility = Visibility.Hidden; }
DockingIndicator di = sender as DockingIndicator;
if (di == null)
if (di.Position == DockingIndicatorPosition.Center)
di.Visibility = Visibility.Hidden;
You can change the post status to "Solved".
Thanks again !
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the DockingIndicator’s Loaded event, so I can make center element hidden. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.