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.
Unfortunately, activation email could not send to your email. Please try again.

DockingManager abilities

Thread ID:

Created:

Updated:

Platform:

Replies:

70060 Nov 25,2007 11:39 AM Nov 28,2007 07:30 PM Windows Forms 1
loading
Tags: Tools
Rouslan Vorobiov
Asked On November 25, 2007 11:39 AM

Hello

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 28, 2007 07:30 PM

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.

[C#]

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);
dhc.ApplyDockInfo();
di.dController.AdjustLayout();

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);
dhc1.ApplyDockInfo();
di1.dController.AdjustLayout();


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

[C#]

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.

Regards,
Nagaraj


CONFIRMATION

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.

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.

;