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

Restore Theme

1 Answer 73 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Andrés David Santacoloma Isaza asked on 02 Oct 2010, 11:06 PM
Hi:
I'm add changes to my themes using ColorBlending, but I need have the original theme too.
then I need to know how restore a theme.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Oct 2010, 09:35 AM
Hi Andrés David Santacoloma Isaza,

If you want to remove the color blend applied to a theme, you should just call the RemoveAllColorBlends method of the Theme instance, for example:
// applying the color blend
Telerik.WinControls.Theme currentTheme = Telerik.WinControls.ThemeResolutionService.GetTheme("BreezeExtended");
currentTheme.AddColorBlend("BaseColor", Telerik.WinControls.HslColor.FromArgb(255, 56, 154, 254));
currentTheme.ThemeProperties["BaseColor"] = Telerik.WinControls.HslColor.FromArgb(255, 245, 143, 41);
  
// removing the color blend
currentTheme.RemoveAllColorBlends();

However, if you want to apply color blend to a theme and keep the original settings of the exact same theme, please note that this is not a supported behavior. The solution is to create a copy of your theme with a different theme name than the original theme. This article describes how to load one of the predefined themes. While saving it, you should just set a different theme name. The saved theme can be loaded in your project as described here. Finally, you will have two different themes in your project which give the same look and feel. When you apply the color blending to one of the themes, the other theme will remain untouched.

I hope this helps.

Best wishes,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Themes and Visual Style Builder
Asked by
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or