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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MainFrameBarManager.ResetCustomization does not work

Thread ID:





94625 May 24,2010 10:07 PM UTC May 26,2010 09:33 AM UTC WinForms 4
Tags: Tools
Tom Warner
Asked On May 24, 2010 10:07 PM UTC

I've created a MainFrameBarManager in my app and created one menu bar.
If I run the application, and remove the menu, then close the application my settings are saved.

Now, if I call mainFrameBarManager.ResetCustomization = true in the Form_Load event, when I shutdown and restart my app, the settings are still saved.

How can I reset my mainFrameBarManager's settings? If I set "AutoPersistCustomization = false" the menu loads fine. However as soon as I turn that setting back to true my menu does not appear.

How can I actually reset my menu settings?

Lingaraj S [Syncfusion]
Replied On May 25, 2010 12:06 PM UTC

Hi Tom,

Thank you for your interest in Syncfusion products.

I am afraid that I was unable to reproduce the mention issue while using ResetCustomization in MainFrameBarManger. We have tested the issue with simple sample and attached in following link.


Please have look at the above sample and let me know if you still face the issue. Could you please try to reproduce the issue in above sample that would be helpful for us to provide a better solution?

Lingaraj S.

Tom Warner
Replied On May 25, 2010 07:33 PM UTC

Your sample works fine as it is, however when I try to add the same exact code to my application it throws a NullReferenceException when calling "MainMenuManager.Bars.Add(bar)".

Neither MainMenuManager, nor bar are null.

The exception details are:

at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarExt.AttachBarControl(BarControlInternal barControl)
at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.BindBarInternal(Bar bar)
at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.AttachMainMenuBar(Bar mainMenuBar)
at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.BarCollectionChanged(Object sender, CollectionChangeEventArgs args)
at System.ComponentModel.CollectionChangeEventHandler.Invoke(Object sender, CollectionChangeEventArgs e)
at Syncfusion.Collections.ArrayListExt.Add(Object value)
at Syncfusion.Windows.Forms.Tools.XPMenus.Bars.Add(Object value)
at IdeaGenerationEditor.MainForm.InitializeMenus() in [My code from here]

Tom Warner
Replied On May 25, 2010 09:21 PM UTC

I believe I solved this problem. I think it was happening due to how the MainFrameBarManager was getting initialized by not calling BeginInit correctly.

Lingaraj S [Syncfusion]
Replied On May 26, 2010 09:33 AM UTC

Hi Tom,

Thanks for the update.

Lingaraj S.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon