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
425
Why is ReparentControl() being called?
posted

Hi, I have a situation where I have setup an ultraDockManager with docked controls.  I am calling ultraDockManager.LoadFromBinary(stream) to reload the dock layout.  This is causing an invocation of UltraDockManager.ReparentControl() for most if not all the controls.  Is this to be expected?

Thanks, Bill

Parents
No Data
Reply
  • 6158
    Verified Answer
    Offline posted

    Hello Bill,

    When loading the UltraDockManager via a LoadFromBinary()/LoadFromXML() call, the entire layout of component is recreated. As such, the UltraDockManager is essentially resets back to its default state. In doing so, all controls currently docked using the UltraDockManager are reparented back to their original container (or the hosting control). After the UltraDockManager creates all of the new panes for the new layout, it associates all the controls referenced by the new panes and reparents the control to the pane's window.

    We use the UltraDockManager.ReparentControl() method to perform the reparenting of one control to another which occurs when moving the control back to it's original container, and again when moving the control from the original container to the new pane.

    Hopefully this explains why the ReparentControl() method is invokes so many times. Let me know if you have any further questions.

    Thanks,

    Chris

Children