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.
I tried this but the the RootElement doesn't seem to have a ForceApplyTheme() method anymore.
4 Answers, 1 is accepted
0
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
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.
- My menu item inherits RadMenuItem and adds a couple properties. I add my inherited menu items to a RadContextMenu.
- I'm using what ever the default theme is. I haven't changed it.
- 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
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:
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
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.