Profile Picture

How to find the NDockingPanelHost for an NDockingPanel

Posted By Craig Swearingen 9 Years Ago
Author
Message
Craig Swearingen
Question Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 99, Visits: 654
I'm loading a saved layout and then trying to create a new NDockingPanel which has the same NDockingPanelHost as a NDockingPanel that was part of the saved layout.  (I'm finding the existing NDockingPanel by using DockManager.GetPanelByKey(key) knowing the key I'm looking for.)

1)  If I have an NDockingPanel how do I get its NDockingPanelHost?  I thought it was the NDockingPanel.ParentZone property but I tried it (and the RootZone property) and its not returning the NDockingPanelHost.  I can see the ParentZoneID for the NDockingPanel in the saved layout .xml file but the only way I can find that GUID is to search the DockManager.RootContainer.RootZone.Children list.  The NDockingPanel.ParentZone.ID returns a different value which is not correct.

2) When searching the NDockingPanelHost.Children list I find in #1 above I can find the NDockingPanel I'm searching for except when its state is AutoHide.  How do I find the NDockingPanel that is in AutoHide state?

3) In creating my new NDockingPanel I'd like to create it AutoHide if the existing NDockingPanel I found is in AutoHide.  How can I tell if an NDockingPanel is in AutoHide state?  I thought it would be NDockingPanel.DockedState.State but this is not showing the current value.  Update: Sorry, I didn't initially see the NDockingPanel.DockState property which holds the current value.

I'd appreciate any thoughts on these questions.

Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 3,973
Hello Craig,

1) ParentZone property can accept values from INDockZone interface type which is implemented indirectly from NDockingPanelHost. You can convert the value of ParentZone property to NDockingPanelHost using "as" which should give you the actual panel that hosts the docking panel.
In NDcokManager.RootZone.Children you can find only the children for that level. You can have another NDockZone as a child of RootZone which on other hand has its own children.
The docking framework has tree-like structure.

2) You can iterate through NDockManager.Panels collection which holds reference to all NDockingPanels that are registered by the the docking structure, and check their DockState property for AutoHide state.

3) To set a NDockingPanel in AutoHide state you can call AutoHide method of the panel.

I hope this helps.


Best Regards,
Nevron Support Team



Craig Swearingen
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 99, Visits: 654
Thanks for responding.  I'm still having difficulties with the auto hide state.  I'll post that as a separate topic.



Similar Topics


Reading This Topic