The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
How can I retrieve the docking state (top, bottom, right etc.) of a control?
Are there any plans for an API like:
DockingStyle GetDockingState(control, parent)?
Thanks
PSPrakash S Syncfusion Team February 10, 2003 10:06 PM UTC
Bruno,
It is not advisable to access the DockingStyle information as this information is completely contextual and attempting to utilize the DockingStyle as a standalone state in a custom persistence implementation will be problematic. The correct approach for a custom persistence mechanism would be via overriding the DockingManager's LoadDockState/SaveDockState/ApplyDeserializedState functions, and modifying it as needed in your derived implementation after studying the actual load/save sequence.
Prakash
BVBruno VaisFebruary 11, 2003 04:47 PM UTC
Prakash,
I need this API for testing purposes, not to save/load the manager. My application makes extensive use of DockControl(...) and I need to test that the control was actually docked where I wanted.
Also, for the same reason, I would need a GetLocation API that returns the location of a control. If I float a control, or set it as an MDI child, there's no way I can find out where it actually is.
Thanks
PSPrakash S Syncfusion Team February 12, 2003 12:45 PM UTC
Hi Bruno,
If it's just for testing the DockControl() method, then the control's current dockstate information can be retrieved through it's DockHost parent. The following code should give you an idea,
Trace.Assert(this.dockingManager.GetEnableDocking(this.listBox1));
Syncfusion.Windows.Forms.Tools.DockHost dhost = this.listBox1.Parent as Syncfusion.Windows.Forms.Tools.DockHost;
Syncfusion.Windows.Forms.Tools.DockHostController dhc = dhost.InternalController as Syncfusion.Windows.Forms.Tools.DockHostController;
Trace.WriteLine(dhc.DINew.dStyle.ToString());
Please bear in mind that the DockingInfo value proivded by the DINew.dStyle attribute will reflect only that specified for the control when invoking the DockControl/FloatControl methods, and is not an accurate indicator of the Control's state within the docking layout. The Control's DINew.dStyle value will be 'DockingStyle.Fill' when FloatControl() was called on it.
Prakash
Syncfusion