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
220
How to get Control or DockableControlPane from DockablePaneBase.
posted

I have subscribed to dockManager event "AfterSplitterDrag" which gives me Panes with a collection of DockablePaneBase affected.

I want to get a control which is docked to that DockablePaneBase? I mean DockManager has a method called PaneFromControl(), is there any way I can get a Control out of DockablePaneBase?

  • 44743
    Verified Answer
    posted

    If you cast the DockablePaneBase instance to a DockableControlPane, you can access the Control property from that instance. Just make sure the DockablePaneBase is actually an instance of DockableControlPane before casting or you will get an exception, because it could also be a DockableGroupPane.