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

Stackpanel Background

3 Answers 948 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Harald
Top achievements
Rank 2
Harald asked on 01 Mar 2016, 09:22 PM

How can i set the Background to the AccentColor from Telerik Theme?

<StackPanel x:Name="Test" Background="{telerik:Office2013Resource ResourceKey=AccentColor}"></StackPanel>

This does not work.

3 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 02 Mar 2016, 12:35 PM
Hello Harald,

On the following link from our documentation page - Office2013 Palette Brushes and Colors - you can find the different brushes used in the Office2013 theme and their hexadecimal representation. For your convenience, I am here adding the values:

- White Color Variation - #FF0072C6

- LightGrey Color Variation - #FF0072C6

- Dark Grey Color Variation -  #FF444444

So applying the following change at your end should do:

<StackPanel x:Name="Test" Background="#FF0072C6"></StackPanel>

Please update me if the information provided was useful. Of course, if you have any further questions or concerns, do not hesitate to contact us.

Regards,
Stefan Nenchev
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Harald
Top achievements
Rank 2
answered on 04 Mar 2016, 03:31 PM

Hi Stefan,

I would like to assign the StackPanel no color code . I would like to assign the color by the resource key . So hopefully I can change the color later in the Color Theme.


0
Accepted
Stefan Nenchev
Telerik team
answered on 07 Mar 2016, 01:19 PM
Hello Harald,

The following approach did the job at my end:

<StackPanel Width="150" Height="150" Background="{telerik:Office2013Resource ResourceKey=AccentBrush}">
Please, try it and update me if it works for you as well.

Regards,
Stefan Nenchev
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Harald
Top achievements
Rank 2
Answers by
Stefan Nenchev
Telerik team
Harald
Top achievements
Rank 2
Share this question
or