J.
J.Nagarajan
Syncfusion Team
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.
[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