After I call
The panel1 event occurs:
private void panel1_VisibleChanged(object sender, System.EventArgs e)
but within the event handler panel1''s Visibile property reports true always, it is only its CanFocus property that reports false after it has been hidden by the dockingManager call.
This does not seem right.
ADAdministrator Syncfusion Team March 24, 2004 02:56 PM
When the panel is docked, it is enclosed within a ContainerControl DockHost. The SetDockVisibility/GetDockVisibility methods deal with the visibility of this DockHost and not the control which is hosted within the DockHost. Hence, the panel would remain visible at all times, and it is only the visibility of its parent control (DockHost) that changes. In this respect, the panel''s Visible property value becomes irrelevant. Please let me know if you any suggestions in this regard. We appreciate your interest in Syncfusion products.
DADanMarch 24, 2004 03:11 PM
Ahah. Well is there a more correct way of determining the visibility of a docked control? Is the DockHost an accessible object? Why does the panel1_VisibleChanged even get fired in the first place then?
ADAdministrator Syncfusion Team March 24, 2004 03:45 PM
Like I have mentioned before, since the visibility of the DockHost manages the visibility of the control hosted within it, you could simply use the DockingManager''s GetDockVisibility/SetDockVisibility methods for this purpose. You could access the DockHost of for any docking window using code like :
Syncfusion.Windows.Forms.Tools.DockHost dhost = panel.Parent as Syncfusion.Windows.Forms.Tools.DockHost;
I have consulted the development team regarding the panel''s VisibleChanged event being fired when the GetDockVisibility/SetDockVisibility methods are invoked, and will update you as soon as I hear from them. We appreciate your continued interest in Syncfusion products.
ADAdministrator Syncfusion Team March 25, 2004 09:30 AM
After having consulted the development team on this issue, I would like to inform you that the VisibleChanged event gets trickled down the parent hierarchy and thus gets generated whenever the visibility state of a direct parent (DockHost, in this case) is changed even though the control(panel) itself might have the property unchanged. Let me know if you need any other information. We appreciate your continued interest in Syncfusion products.