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

Getting theme color from resource

1 Answer 382 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 02 Jun 2011, 08:03 PM
Is there anyway I can get a defined resource from a theme?

I'd like to set the background color of my stackPanel to the same color as the header background of the tab control, or the background of the docking control. But I'm not sure where these resources are defined so I can use them. I'd prefer to use the defined resource rather than digging into the theme xaml and using the same hard-coded value. Because I'd like to be able to change the theme in the future without having to change all these hard-coded values.

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 08 Jun 2011, 09:20 AM
Hi Rayne,

There are two ways to get the theme color that you would like to use, unfortunately you should use the hard-coded value:

1. Edit the template of the tab control, or docking control. Find the background that you would like to use.
2. After the installation of the controls, a Themes folder is installed. Inside it you may find all the theme files for the controls (xaml files). Inside them, in the template of the specified control, you may find the background that you want to use . 

There is a possibility to use some of the defined brushed, but this is not recommended as it would lead to errors in case that we change the name of the brush.

Best wishes,
Didie
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
General Discussions
Asked by
Rayne
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or