Hi,
I want to extend the RadGridView control, so I do "public class TkGrid : Telerik.WinControls.UI.RadGridView {}"
How do I apply a theme to TkGrid control ? I set "ThemeResolutionService.ApplicationThemeName = "FluentDark" but this doesn't work.
I attached a small project where I have one TkGrid and one RadGridView. On top of form there is a dropdown from where you can change the theme
When I do this, TkGrid is not displayed with the new theme (this works for RadGridView)
p.s. I also added a custom Button, TkButton inherited from RadButton. When I change the theme, the look of TkButton is changed, so this is ok
Hello, Trustteam,
Note, when you inherit from a RadControl (or any RadControl descendant), the original control themes are not automatically inherited. In order to guarantee that the custom control that you use will get the desired theme you should override the ThemeClassName property of the descendant of RadGridView as shown below:
public partial class TkGrid : Telerik.WinControls.UI.RadGridView
{
public override string ThemeClassName
{
get
{
return typeof(RadGridView).FullName;
}
}
}
You can see the result in the gif file. I modified the provided project accordingly. More information is available here: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/inherit-themes-from-radcontrols-derivatives
I will change the status of this bug report to Declined since this is not an issue.
Should you have other questions do not hesitate to contact me.
Regards,
Nadya
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.