This is a migrated thread and some comments may be shown as answers.

this.MainMenuStrip

9 Answers 223 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Juan Pablo
Top achievements
Rank 1
Juan Pablo asked on 06 Jan 2009, 05:16 PM
Hello ...

Look, I'm changing by code the UI of an application. It's almost done, but there is the main menu of the main form.
The main form is a Telerik's ShapedForm.
Most of the menu items are enabled, disabled, visible or invisible according of some conditions, and this behavior is done through some classes.

My question is this:
When I have the windows form standard menu, it is assigned like this:
this.MainMenuStrip = this.mainMenuStrip;

But when mainMenuStrip is a Telerik RadMenu I'm getting an error that says that it is not possible to convert implicitly from the telerik type to the windows type. And when i do a cast I get a message that you can't convert to the windows type.

This is a very complex application, and I can't change the type of the form.

Thanks for your help!

9 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 07 Jan 2009, 12:42 PM
Hello Juan Pablo,

Thank you for contacting us.

The MainMenuStrip property is used mainly to manage keyboard shortcuts in Microsoft's MenuStrip and to implement MDI menu merge. RadMenu inherits RadControl instead of MenuStrip and it is not possible to assign the MainMenuStrip property with it. Nevertheless, RadMenu contains its own keyboard management which is independent from the Form. As to the MDI menu merge, it is currently not supported in RadMenu. We plan to implement this feature in one of our upcoming releases.

Do not hesitate to write me back, if you have any other questions.

Sincerely yours,
Jack
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Juan Pablo
Top achievements
Rank 1
answered on 07 Jan 2009, 03:30 PM
Thanks for your answer.

Is there any workaround?
I really need to implement the menu.
0
Jack
Telerik team
answered on 08 Jan 2009, 06:23 PM
Hi Juan,

Thank you for writing us back.

It is not possible to assign the RadMenu to the MainMenuStrip property. However, I will be glad to help you with the UI transition process. Could you, please specify why you need to do this? Maybe, we could find a better solution.

Feel free to write us, if you have further questions.

Regards,
Jack
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Juan Pablo
Top achievements
Rank 1
answered on 12 Jan 2009, 10:49 PM
Thanks for your answer.

Now I have a default windows control menu in my application, and the menu items have a defined background. But I can't control how it looks when an item hovers or clicks it because it takes the default Windows theme.

That's the reason why I need to use a Telerik menú, because it's easy to create a theme and assign it to the control.

I hope you can help me.
0
Jack
Telerik team
answered on 15 Jan 2009, 10:27 AM
Hi Juan,

You need just to add a RadMenu control to your form and dock it at top of the form. There is no need to set the MainMenuStrip property. If you need some specific behavior, please send me your application and I will try to find the best solution for your case.

Should you have further questions, I will be glad to help you.

Regards,
Jack
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Martin Lundgard
Top achievements
Rank 2
answered on 01 Dec 2009, 10:55 AM
When using the System.Windows.Forms.MenuStrip you get the possibility to set MdiWindowListItem. When you cannot use RadMenu as MainMenuStrip, you do not. How do you go about having a MdiWindowListItem in the RadMenu?
0
Deyan
Telerik team
answered on 02 Dec 2009, 03:41 PM
Hello Arve,

Thanks for contacting us and for your question. Please, take a look at the our documentation regarding this topic:

MDI List in RadMenu

Please note, that this feature is available since Q2 2009. If you are using an older version of RadControls for WinForms, this feature will not be available.

Kind regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Manesh
Top achievements
Rank 2
answered on 07 Jul 2012, 09:34 AM
I had 9 items in the menu and programmatic-ally set the visiblity = false to some items and when the window opened items got disabled but the visibled items are remained on the same place they haven't got arranged please click the image below and reply me urgently please
0
Stefan
Telerik team
answered on 11 Jul 2012, 09:09 AM
Hello Manesh,

Thank you for writing.

The Visibility property of RadMenuItem does not have an option "false". You can set one of the ElementVisibility's options - Visible, Collapsed, Hidden. If you set the Visibility to Hidden, the item space will remain reserved, and just the item will not be visible. If you want to collapse the item's space, use the Collapsed option:
radMenu1.Items[1].Visibility = ElementVisibility.Collapsed;

Off topic, please note that this thread concerns the Mdi List support of RadMenu and your question is not related to it. Please try to either find a suitable thread to post your question in or open a new thread of you cannot find one. This way it will be easier for the community to quickly find the answers needed.

I hope that you find this information useful.
 
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Gaurav
Top achievements
Rank 1
commented on 20 Jul 2023, 05:12 AM

Hi @stefan,

Is this possible now?

To assign RadMenu to MainMenuStrip?

Dinko | Tech Support Engineer
Telerik team
commented on 24 Jul 2023, 07:19 AM

Hi Gaurav,

RadMenu from the Telerik UI for WinForms suite has a different internal implementation than the MS MenuStrip. So it is not possible to assign RadMenu to MainMenuStrip.

RadMenuItem(s) have a Boolean property called MdiList. If it is set to true, the item is in the first level of the hierarchy, and the item is located in a parent MDI form, this item becomes an MDI list for the application. This means that all child MDI forms will appear in it as items and a click on such item activates the corresponding form: MDI LIST  

RadMenu also supports menu merging: Menu Merge in MDI Applications    

Tags
Menu
Asked by
Juan Pablo
Top achievements
Rank 1
Answers by
Jack
Telerik team
Juan Pablo
Top achievements
Rank 1
Martin Lundgard
Top achievements
Rank 2
Deyan
Telerik team
Manesh
Top achievements
Rank 2
Stefan
Telerik team
Share this question
or