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

Theme + color blend

1 Answer 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 10 Jun 2009, 08:53 AM

The Telerik Theme class is missing an iterator for the used colors in the theme. With such an iterator it would be much easier to use the color blend feature.

As an extension i would like to suggest to have a getter/setter for a colorpalette which contains all the used colors of a theme. The advantage of the colorpalette is it could have an iterator for the colors, be loaded/saved to xml and it could be easily used with every theme. When i define a green colorpalette i could use it with the desert theme, the office 2007 blue theme, the aqua theme, ...

As a further side effect telerik could provide predefined colorpalettes like a silver and a black colorpalette and then we would not need the office2007black and office2007silver theme anymore. We would just change the colorpalette to silver or black. 

Kind Regards,

Ramius   

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 11 Jun 2009, 02:29 PM
Hello Ramius,

Thank you for the nice suggestion.
Actually once you call ApplyColorBlend method, you can iterate through the color blends of a theme, using Theme.ThemeProperties dictionary.
The code may resemble the following:
Theme theme = ThemeResolutionService.GetTheme(customThemeName); 
theme.AddColorBlend("prop1", HslColor.FromColor(Color.Red)); 
theme.AddColorBlend("prop2", HslColor.FromColor(Color.Blue)); 
 
theme.ThemeProperties["param1"] = HslColor.FromColor(Color.Yellow); 
theme.ThemeProperties["param2"] = HslColor.FromColor(Color.Green); 
 
foreach(KeyValuePair<stringobject> prop in theme.ThemeProperties) 
    //prop.Key is the color blend name - prop1 or prop2 
    //prop.Value will the new HslColor value 

It will be great If you have any suggestions how to improve the API to be more convenient. Even though the time frame is getting really short, we still can squeeze in some improvements for Q2.

Concerning predefined color pallets for Office 2007 Blue/Black/Silver themes the problem is that color blends offer limited flexibility in terms of graphics design and themes would still need some fine -tuning in Visual Style Builder. Nevertheless we will consider your suggestion and discuss possible improvements in this area.

Kind regards,
Mike
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Ramius
Top achievements
Rank 1
Answers by
Mike
Telerik team
Share this question
or