this.MainMenuStrip

10 posts, 0 answers
  1. Juan Pablo
    Juan Pablo avatar
    19 posts
    Member since:
    Oct 2008

    Posted 06 Jan 2009 Link to this post

    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!
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 07 Jan 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Juan Pablo
    Juan Pablo avatar
    19 posts
    Member since:
    Oct 2008

    Posted 07 Jan 2009 Link to this post

    Thanks for your answer.

    Is there any workaround?
    I really need to implement the menu.
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 08 Jan 2009 Link to this post

    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.
  6. Juan Pablo
    Juan Pablo avatar
    19 posts
    Member since:
    Oct 2008

    Posted 12 Jan 2009 Link to this post

    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.
  7. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 15 Jan 2009 Link to this post

    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.
  8. Arve Asheim
    Arve Asheim avatar
    8 posts
    Member since:
    Jun 2009

    Posted 01 Dec 2009 Link to this post

    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?
  9. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 02 Dec 2009 Link to this post

    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.
  10. Manesh
    Manesh avatar
    24 posts
    Member since:
    Feb 2012

    Posted 07 Jul 2012 Link to this post

    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
  11. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 11 Jul 2012 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready