Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
510
How to find a specific DockableGroupPane
posted

What is the fastest way to find a specific DockableGroupPane?   The only way I see is to enumerate through all dock areas looking for the DockableGroupPane with the specific name.  There must be a better way... 

Parents
No Data
Reply
  • 12480
    Suggested Answer
    Offline posted

    Hi Joseph,

    If you know the pane's key, you can use the PaneFromKey method to get access to the pane. Note that this method finds the pane by enumerating through the dock areas, so it may not actually be more performant than the method you suggested.

    If you do not have the pane's key, then you will need to use another method to find it. I wrote the following code to find a specific DockableGroupPane based on the DockableControlPane nested within it. The DockableControlPane's key can be set through the designer interface, using the Docked Pane tab that appears on the property grid once a control is docked.

    DockablePaneBase buttonPane = ultraDockManager1.PaneFromKey("ButtonPane");
    DockableGroupPane groupPane = buttonPane.Parent;
    groupPane.Key = "Group";

    Once you set the key, you can then use PaneFromKey to access it.

Children
No Data