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.
Unfortunately, activation email could not send to your email. Please try again.

Resetting toolbar positions for MSI children

Thread ID:

Created:

Updated:

Platform:

Replies:

41970 Mar 16,2006 03:51 AM Mar 17,2006 09:15 AM Windows Forms 1
loading
Tags: Tools
Paul Wardle
Asked On March 16, 2006 03:51 AM

Is it possible to reset the toolbar positions for MDI child windows?

Mano J [Syncfusion]
Replied On March 17, 2006 09:15 AM

Hi Paul, There is no direct way of resetting the childform bar positions, as the MainFrameBarManager alone has the LoadDesignerBarState method which is used to reset the bar postions in the mainform. One way is, you can save the bar state in the form_load event using AppStateSerializer for resetting it later. private void Form1_Load(object sender, System.EventArgs e) { // Child Form Form2 frm= new Form2(); frm.MdiParent = this; frm.Show(); // Save the BarState using AppStateSerializer AppStateSerializer app = new AppStateSerializer(SerializeMode.XMLFile, "..\\..\\ResetStatePersist"); this.mainFrameBarManager1.SaveBarState(app); app.PersistNow(); } private void ResetButton_Click(object sender, System.EventArgs e) { AppStateSerializer app = new AppStateSerializer(SerializeMode.XMLFile, "..\\..\\ResetStatePersist"); this.mainFrameBarManager1.LoadBarState(app); } I have attached a sample that shows this completely. Change the position of the toolBars and click the "Reset" button to reset(load state) the Bar positions. Please let me know if this helps you. Thanks for using Syncfusion products. Regards, Mano Resetbarpostions_F41970.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;