How to lock the docked windows on a form to prevent the layout of the form in WinForms Docking Manager?
Dragallow event
You can handle the DockingManager’s DragAllow event for this purpose and set the DragAllowEventArgs’ Cancel property to True as shown below:
This will prevent the docking windows from being dragged and the GUI layout being changed accidentally.
C#
private void dockingManager1_DragAllow(object sender,
Syncfusion.Windows.Forms.Tools.DragAllowEventArgs arg)
{
arg.Cancel = true;
}
VB
Private Sub dockingManager1_DragAllow(ByVal sender As Object, ByVal arg As Syncfusion.Windows.Forms.Tools.DragAllowEventArgs) Handles dockingManager1.DragAllow arg.Cancel=True End Sub
Reference link: https://help.syncfusion.com/windowsforms/dockingmanager/docking-events#drag-events