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

XP Menus crash while closing child windows in MDI Application

Thread ID:





62692 Jun 20,2007 03:00 PM UTC Jul 11,2007 10:46 AM UTC WinForms 3
Tags: Tools
Asked On June 20, 2007 03:00 PM UTC


I am using XPMenu Bar and MdiMainFrameBarManager and MDIChildFrameBarManager in my application to manage the menu of both Mdi parent and child forms. While I try to close my application by closing the child windows one by one, I get the following error:
System.NullReferenceException: A BarItem (Text: &File) that is not part of a BarManager is found in the menus or toolbars. Make sure to add

the BarItem to a BarManager before adding it to the menus or toolbars.
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RefreshContainer(IBarItemContainer container)
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.UpdateBarsInManager(BarManager manager)
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.UpdateBars()
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.OnFormActivated(Form form)
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.set_LatestActiveMdiChild(Form value)
at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.MdiChildActivated(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnMdiChildActivate(EventArgs e)
at System.Windows.Forms.Form.ActivateMdiChildInternal(Form form)
at System.Windows.Forms.Form.WmMdiActivate(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I am afraid that this error is not consistent. I am using Syncfusion and VS2005. The trace is attached herewith.

Can anyone help me in this!

Thanks in advance,


JayaLakshmi [Syncfusion]
Replied On June 21, 2007 08:46 AM UTC

Hi Nevin,

Thank you for using Syncfusion products.

I am afraid that I could not able to reproduce this issue in version.

Please try to reproduce this in the below sample.


If you create baritems programmatically then add them to BarManager first and then to bar.

Could you please provide me more information on how you add baritems using XPMenus ?

It will be very helpful if you provide me a sample on that ?


Replied On July 5, 2007 10:39 AM UTC

Hi Jaya,

I am still getting the error in my application. I tried with the sample application and it is not given any such error. As you have mentioned, I am not using RegisterTypes or UnRegister in my code.

Is there any way to solve this issue, it's being a long time this issues is still opened.

Any Help will be greatly appreciated.

Nevin C

JayaLakshmi [Syncfusion]
Replied On July 11, 2007 10:46 AM UTC

Hi Nevin,

Sorry for the delay in getting back to you.

Have you added baritems programmatically to MainForm and ChildForm?

Could you please make sure that the Baritem 'File' is added to MainFrameBarManager and Bar's collection?

If you are not able to reproduce the issue in the above sample, then please give us the following details :

1) CS file
2) Steps you have followed at design time or at run time to create baritems on MainForm and ChildForm
3) Video file showing the issue.

The above details would help us to sort out the cause of the issue and fix it soon.

Thanks for your patience.



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