We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DockingManager abilities

Thread ID:





70060 Nov 25,2007 04:39 PM UTC Nov 29,2007 12:30 AM UTC WinForms 1
Tags: Tools
Rouslan Vorobiov
Asked On November 25, 2007 04:39 PM UTC


I have 4 controls in UI of my application.
I'm using a DockingManager and all of the controls are docked as matrix.
I want to swap left top control with bottom right one.
For this aim I use DockControl method of DockingManager but controls are not docked as I need.
What is the right way to make a correct swapping?

Another question is how could I use the DockingManager but prevent from user the ability to drag controls?

Thanx a lot!

J.Nagarajan [Syncfusion]
Replied On November 29, 2007 12:30 AM UTC

Hi Corrado ,

Thanks for your interest in SYncfusion products.

1. If your intention is to change the order of the controls in dock layout then please refer to the following code snippet.


DockHost dh = this.panel1.Parent as DockHost;
DockHostController dhc = dh.InternalController as DockHostController;
DockInfo di = dhc.DINew;
di.DP = DockPreference.Vertical;//.Vertical;
di.nDockIndex = 2;
di.nPriority = 0;
dhc.DINew = new DockInfo(di);

DockHost dh1 = this.panel3.Parent as DockHost;
DockHostController dhc1= dh1.InternalController as DockHostController;
DockInfo di1 = dhc1.DINew;
di1.DP = DockPreference.Tabbed;//.Vertical;
di1.nDockIndex = 0;
di1.nPriority = 0;
dhc1.DINew = new DockInfo(di1);

2. You can prevent the dragging of dock control by handling the DragAllow event. Please refer to the following code snippet.


private void dockingManager1_DragAllow(object sender, DragAllowEventArgs arg)
if (arg.Control is Panel)
arg.Cancel = true;

Please let me knwow if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon