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.

MainFrameBarManager.ResetCustomization does not work

Thread ID:

Created:

Updated:

Platform:

Replies:

94625 May 24,2010 06:07 PM May 26,2010 05:33 AM Windows Forms 4
loading
Tags: Tools
Tom Warner
Asked On May 24, 2010 06:07 PM

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 08:06 AM

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.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=MenuItemsInsertTest-947496804.zip


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?

Regards,
Lingaraj S.


Tom Warner
Replied On May 25, 2010 03:33 PM

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 05:21 PM

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 05:33 AM

Hi Tom,

Thanks for the update.

Regards,
Lingaraj S.

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.

;