PSPrakash S Syncfusion Team February 10, 2003 05:06 PM
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.
BVBruno VaisFebruary 11, 2003 11:47 AM
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.
PSPrakash S Syncfusion Team February 12, 2003 07:45 AM
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,
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;
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.