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

Office2013 colours in XAML

3 Answers 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 03 Sep 2014, 08:13 AM
Is it possible to get hold of the Office2013Palette.Palette.AccentMainColor in XAML?

I know you can get hold of the brushes, using something such as
      telerik:Office2013Resource ResourceKey=EffectAccentHighBrush

however, I need to assign to a color property in the XAML. For the Windows 8 theme, I would use something along the lines of 
      Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MainColor}"

Is there a way to get the similar value for the Office2013 theme? 

Thanks
Jason

3 Answers, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 03 Sep 2014, 09:11 AM
Hi Jason,


Thank you for contacting us. 

As it turns out, it is not possible to customize Office2013 palette in XAML, only in code-behind.  
I recommend you use the approach suggested in our online documentation.
Once you change one of the default colors, all Telerik controls in your application will be affected. 

Hope this helps. 


Regards,
Vanya Pavlova
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jason
Top achievements
Rank 1
answered on 03 Sep 2014, 10:37 AM
Thanks, I'm already aware of that code, but that doesn't really address my issue.

I'm creating new templates that I want to colour, based on the colours set in the code you linked to above. However, I don't want my templates hardcoded, hence the desire to get to the palette in XAML.

I shall look into another approach
0
Vanya Pavlova
Telerik team
answered on 03 Sep 2014, 11:20 AM
Hi Jason,


If you have any other questions related to UI for WPF, do not hesitate to contact us.  

Have a great day. 


Regards,
Vanya Pavlova
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Jason
Top achievements
Rank 1
Share this question
or