We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DockingManager and Visible and CanFocus

After I call dockingManager.SetDockVisibility(panel1, false); 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.

4 Replies

AD Administrator Syncfusion Team March 24, 2004 02:56 PM

Hi Dan, 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. Regards, Guru Patwal Syncfusion, Inc.


DA Dan March 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?


AD Administrator Syncfusion Team March 24, 2004 03:45 PM

Hi Dan, 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. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team March 25, 2004 09:30 AM

Hi Dan, 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. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon