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

InvalidCastException received when adding NavigationView Component to the RibbonForm

Thread ID:





89637 Sep 1,2009 05:36 AM UTC Sep 8,2009 07:27 AM UTC WinForms 3
Tags: Tools
Jin Long Suan
Asked On September 1, 2009 05:36 AM UTC

InvalidCastException received when adding NavigationView Component to the RibbonForm.
Sometimes it can be added to the form , but mostly it will throw an InvalidCastException. I donnot know why. Someone will be so kindly to help me. Thanks.


Balavasanth [Syncfusion]
Replied On September 4, 2009 10:33 AM UTC

Hi Guy Huang,

Thanks for your interests in Syncfusion products.

We are not able to reproduce your issue, instead we tried to create a simple sample by adding a Navigation view component control in to the Ribbon Form. But we could see that everything works fine. Please find the sample from the below location.


and try reproducing the issue.

And also from your screen shot we could see that you have exceptions raising in the XpMenuProvider class, so we are not sure in what case you get this issue. So if you could still reproduce the issue, please give us more information about your exact issue or even a simple sample where we can reproduce the issue could be much helpful for us to investigate further and fix the issue, if any.

Please let us know if you have any queries.


Jin Long Suan
Replied On September 7, 2009 02:56 AM UTC

Dear Bala:
Glad to receive your reply.
The attachment is my project. It is created by VS2008 SP1, the target platform is Net2.0. The steps as followings:
1.Create a WinForm project. VS has automaticly added a subclass of System.Windows.Forms.Form named form1.
2.Modify the form1's fatherclass to RibbonForm class. Build and find no errors.
3.Add some other controls, such as RibbonControlAdv, DockingManager, ToolStripTabItem, TreeViewAdv and so on.Build and find no errors.
4.Delete some controls. Do some necessary modifies and build.
5.Add NavigationBar control onto form and will receive the Exception.

Also I found some other strange issues. When I already added a GroupBar Control and set the properties. Then i build the project, i will receive an Design Error, the message is like "未找到组件所提供的根", in English is like "unable to find the root of the control". Click "ignorn and continue" button, the form opened in design mode, but the groupbar has gone! And then I cannot add groupbar to the form, it will receive the same invalidCastException.

Thank you.


Balavasanth [Syncfusion]
Replied On September 8, 2009 07:27 AM UTC

Hi Guy Huang,

Thanks for the detailed replication procedure.

We are able to see the InvalidCastException problem in your sample when we tried to add a Groupbar(you mean as a NavigationView Component) in to the Ribbon ControlAdv. But when we tried to create a sample on your requirement we are not able to see any such issues, because we tried to add Groupbar to the Form first then we add the RibbonControlAdv to our application and then using the "bring to front" the Groupbar and align it where it has to be displayed. Then we added the rest of the controls. Kindly make use of the sample for more idea. We hope this will help you.


And also we hope that you are trying to implement a sample similar to Outlook, we have already implemented Outlook demo sample with the windows sample browser(Product Show case sample --> Outlook Demo), please have a look in to the screen shot for more idea.


Please let us know if you have any queries.



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