Get the control’s parent and cast this to type Syncfusion.Windows.Forms.Tools.DockHost. Now access the DockHost’s InternalController and get its current Docking Information from the DICurrent() method.
This will return an object of type Syncfusion.Windows.Forms.Tools.DockInfo. The DockInfo.DockingStyle member gives the dock position of the particular control.
If the control is floating, then DockingStyle will be equal to Syncfusion.Windows.Forms.Tools.DockingStyle.Fill.
Please refer to the code sample below which shows how the DockInfo object can be captured:
// Suppose ctl is the docked control
DockHost dhost = ctl.Parent as DockHost;
DockHostController dhc = dhost.InternalController as DockHostController;
DockInfo di = dhc.DICurrent;
// Returns the DockingStyle of the docking window
' Suppose ctl is the docked control
Dim dhost As DockHost = CType(IIf(TypeOf ctlParent Is DockHost, ctlParent, Nothing), DockHost)
Dim dhc As DockHostController = CType(IIf(TypeOf dhost.InternalController Is DockHostController, dhost.InternalController, Nothing), DockHostController)
Dim di As DockInfo = dhc.DICurrent
' Returns the DockingStyle of the docking window
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
or the page will be automatically redirected to sign-in page in 10 seconds.