Stackpanel Background

4 posts, 1 answers
  1. Harald
    Harald avatar
    48 posts
    Member since:
    Oct 2013

    Posted 01 Mar Link to this post

    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.

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    281 posts

    Posted 02 Mar Link to this post

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

    Posted 04 Mar in reply to Stefan Nenchev Link to this post

    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.


  5. Answer
    Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    281 posts

    Posted 07 Mar Link to this post

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