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

Context menu has no theme

4 Answers 159 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 22 Feb 2013, 10:41 PM
I created a RadContextMenu and added it to my RadGridView, but the menu appears to have no theme. It doesn't look anything like the default menu and the ThemeName is blank.

I tried this but the the RootElement doesn't seem to have a ForceApplyTheme() method anymore.

4 Answers, 1 is accepted

Sort by
0
Anton
Telerik team
answered on 26 Feb 2013, 02:09 PM
Hi Jay,

Thank you for writing.

The provided information is not enough for me to determine what causes this behavior. Could you please provide me more information about the following questions:
1. Is it your menu custom that inherits RadContextMenu?
2. What is the theme that you are using?
3. What is the version of our suite that you are using?

I am looking forward to your reply.

Kind regards,
Anton
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Jay
Top achievements
Rank 1
answered on 26 Feb 2013, 02:31 PM
Thanks for your response.

  1. My menu item inherits RadMenuItem and adds a couple properties. I add my inherited menu items to a RadContextMenu.
  2. I'm using what ever the default theme is. I haven't changed it.
  3. When I right click a Tekerik assembly in References and select Properties, it says Version = 2013.1.220.20, Runtime Version = v2.0.50727. I am using a trial version.

Thanks,
Jay

0
Anton
Telerik team
answered on 27 Feb 2013, 02:33 PM
Hello Jay,

Thank you for writing.

When you are using custom elements you should override the ThemeEffectiveType property to return the type of base element - in your case RadMenuItem. For example:
protected override Type ThemeEffectiveType
{
    get
    {
        return typeof(RadMenuItem);
    }
}

This will allow your custom element to be recognized by our themes like RadMenuItem and the style for it to be applied to your custom element.

I hope this helps. Should you have any other questions, I will be glad to assist you.

All the best,
Anton
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Jay
Top achievements
Rank 1
answered on 27 Feb 2013, 07:15 PM
Thanks Anton. That worked great.
Tags
ContextMenu
Asked by
Jay
Top achievements
Rank 1
Answers by
Anton
Telerik team
Jay
Top achievements
Rank 1
Share this question
or