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

RegisterMdiChildTypes throw ApplicationException

Thread ID:





82736 Jun 19,2009 05:52 PM UTC Jul 7,2009 09:57 AM UTC WinForms 3
Tags: Tools
Henry Nguyen
Asked On June 19, 2009 05:52 PM UTC

I upgraded my application from 3.2 to 7.1, When the main form call RegisterMdiChildTypes to register a child form, the application crashed with stack trace:

Error Message: A BarItem not part of a BarManager's Items list is encountered.
Exception Type: System.ApplicationException
at Syncfusion.Windows.Forms.Tools.XPMenus.BarItemID.FromBarItem(BarItem item)
at Syncfusion.Windows.Forms.Tools.XPMenus.MergedBar.MergeBars(Bar[] bars)
at Syncfusion.Windows.Forms.Tools.XPMenus.MergedBar..ctor(Bar[] barsToMerge, BarManager manager)
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.InitMergedBars()
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RegisterMdiChildTypes(Type[] formTypes, Form[] forms)
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RegisterMdiChildTypes(Type[] formTypes)

I figured out because in the main form, I remove references to some bar items (mainFrameBarManager.RemoveReferencesToBarItem) is the cause of the problem. My question is what I need to do in the child form or the main form to fix the problem, I cannot find what bar items in the child form that caused the merged problem, any hint to find them?

Administrator [Syncfusion]
Replied On June 24, 2009 09:13 AM UTC

Hi Henry,

Sorry for the delayed response.

Can you please try reproducing the issue from the shipped sample located below or send us a sample illustrating the issue that would help us to sort out the issue?

..\Tools.Windows\Samples\2.0\Menus Package\MDI Demo

Thank you for using Syncfusion products.


Henry Nguyen
Replied On July 1, 2009 09:31 PM UTC

Hi Jaya,

Thanks for the response, I was able to fix the problem. When We use RemoveReferencesToBarItem method on both ParentBarItem and BarItem, we get the exception. This exception is not thrown in 3.2, but in 7.1.


Administrator [Syncfusion]
Replied On July 7, 2009 09:57 AM UTC

Hi Henry,

We glad to hear that your issue has been resolved. Please let us know if you have any further issues.



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