We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SaveDockState does not save size or position of HostForm

Using C++/CLI. Is there any way to have my mainframe class (the hostform) size and position saved/restored as part of the Save/Load DockState calls?

The code that allocates/inits the dock manager:

m_pDockingManager = (gcnew Syncfusion::Windows::Forms::Tools::DockingManager(this->components));
m_pDockingManager->BeginInit();
m_pDockingManager->HostForm = this;
m_pDockingManager->ThemesEnabled=true;
m_pDockingManager->AllowTabsMoving = true;
m_pDockingManager->AnimationStep = 2;
m_pDockingManager->VisualStyle = Syncfusion::Windows::Forms::VisualStyle::Office2007;
m_pDockingManager->PersistState = true;
m_pDockingManager->EnableContextMenu = true;
m_pDockingManager->EnableAutoHideTabContextMenu = true;
m_pDockingManager->MenuButtonEnabled = true;
m_pDockingManager->MaximizeButtonEnabled = true;
m_pDockingManager->CloseEnabled = true;
m_pDockingManager->DockControlActivated += gcnew Syncfusion::Windows::Forms::Tools::DockActivationChangedEventHandler(this, &mainframe::ActiveDocumentChanged);
m_pDockingManager->EndInit();

1 Reply

DK Dhivya K Syncfusion Team December 8, 2009 12:36 PM UTC

Hi Ben,

Save and Load DockState Calls only serialize and deserialize control's docking state information. It doesn't stores the controls size and position. However, this can be performed by serializing form Bounds and retrieve/deserialize them manually and position the form as per available serialized information.

Can you please create a DT incident if you have more queries on this?

Regards,
Dhivya.

Loader.
Live Chat Icon For mobile
Up arrow icon