Hi
What I'm trying to do is to use VisualStudio2012Light theme on my entire application and on my main form trying to use my custom theme on some controls. But my custom theme is not applying on the controls
The Code:
On Program.Main()
using (var TemaGeral = new Telerik.WinControls.Themes.VisualStudio2012LightTheme())
{
TemaGeral.DeserializeTheme();
ThemeResolutionService.ApplicationThemeName = TemaGeral.ThemeName;
}
On MyForm.Constructor()
public NovoMenu()
{
InitializeComponent();
using (var tema = new Temas.Telerik.NossoERPVisualStudio2012LightTheme())
{
tema.Load();
tema.DeserializeTheme();
ThemeResolutionService.ApplyThemeToControlTree(pnMenu, tema.ThemeName);
this.ThemeName = tema.ThemeName;
}
}
My Custom Theme class
public class NossoERPVisualStudio2012LightTheme : RadThemeComponentBase
{
static bool loaded;
public NossoERPVisualStudio2012LightTheme()
{
ThemeRepository.RegisterTheme(this);
}
static NossoERPVisualStudio2012LightTheme()
{
}
public override void Load()
{
if (!loaded || this.IsDesignMode)
{
loaded = true;
Assembly resource = typeof(NossoERPVisualStudio2012LightTheme).Assembly;
this.LoadResource(resource, "Nosso.Temas.Telerik.NossoERPVisualStudio2012Light.tssp");
}
}
public override string ThemeName
{
get
{
return "NossoERPVisualStudio2012Light";
}
}
}
Is that possible?
My theme code is working i've tested it using on my entire application, and its ok.
Sorry for bad english