Mini Kabibi Habibi
{\rtf1\ansi\ansicpg1251\deff0\deftab709{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\lang1033\f0\fs28 Saving and Restoring the Layout of Dock Panels\fs24\tab \par
\par
\tab\fs22 The layout of dock panels defines how the panels are arranged within a form, their positions, sizes and visibilities. This layout can be saved to the system registry, an XML file or a stream. \par
\fs24 \par
\fs28 Saving the Layout of Dock Panels \fs24\par
\par
\fs22\tab To save the layout of dock panels the following methods can be used: DockManager.SaveLayoutToRegistry, DockManager.SaveLayoutToStream and DockManager.SaveLayoutToXml. The saved layout can then be restored via the DockManager.RestoreLayoutFromRegistry, DockManager.RestoreLayoutFromStream and DockManager.RestoreLayoutFromXml methods, respectively. \par
\par
\tab The DockManager.SaveLayoutToRegistry method's takes the path parameter which specifies the registry key to save the settings to. You are allowed to define whole and partial registry keys. For instance, if you define a partial key, "Software\\MyCompany\\MyTool\\" the full path will be as follows: "HKEY_CURRENT_USER\\Software\\MyCompany\\MyTool\\". If you wish to store a layout in another root key, you should define the entire path, for instance: "HKEY_LOCAL_MACHINE\\Software\\MyCompany\\MyTool\\". \par
\par
Example 1 \par
\par
string xmlFile = "c:\\\\XtraBars\\\\DockStates\\\\MainState.xml";\par
dockManager1.SaveLayoutToXml(xmlFile);\par
// ... \par
dockManager1.RestoreLayoutFromXml(xmlFile);\par
\pard\sa200\sl276\slmult1\lang9\par
}