Office2013 colours in XAML

4 posts, 1 answers
  1. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 03 Sep 2014 Link to this post

    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
  2. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 03 Sep 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 03 Sep 2014 in reply to Vanya Pavlova Link to this post

    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
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 03 Sep 2014 Link to this post

    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.
     
Back to Top