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
90
LoadFromXML is not loading all the control
posted

Hi,

On opening the application.

i have a button which will open a child window(user control).

now i docked that child window to the dockmanager.

i used SaveAsXml to save the dock setting .

when again i start the application,the child window that was docked was not initialized to the last save position.

please help me on this

regards,

sid

Parents
  • 44743
    Verified Answer
    posted

    When loading a layout with LoadFromXml, the loaded DockableControlPanes have a control name loaded with them. The loading logic then tries to find a control somewhere on the Form which has the same name. If it finds one, it puts it in the loaded pane. If it doesn't find one, the pane is destroyed. So when you create your UserControl to show as a pane, make sure to set its Name property to a unique value. Then before you load your layout file, create another UserControl and give it the same Name property. Add the UserControl to the Form (or any control nested in the Form) and then call LoadFromXml.

Reply Children