Change BackgroundColor of RadWindow Theme="Windows8"

2 posts, 1 answers
  1. ITA
    ITA avatar
    387 posts
    Member since:
    Aug 2009

    Posted 26 May 2014 Link to this post


    I want to use the Style of Windows8 Theme for my "RadWindow", but I want to change
    just the "WindowHeEaderBackground" color from blue to green.

    How can I solve this easily.

    Thanks a lot
  2. Answer
    Kalin avatar
    1357 posts

    Posted 27 May 2014 Link to this post

    Hello Rene,

    The Header of RadWindow uses the AccentBrush of the Windows8Theme and you could easily change its color by modifying that brush. Note that will also affect the appearance of the other controls used in the project:

    Windows8Palette.Palette.AccentColor = Colors.Orange;

    For more details about the predefined brushes in the Windows8Theme please check the following article from our online help documentation:

    However if you need to change the background of the Header of a particular RadWindow you can do from the code behind the following way:

    var window = new RadWindow { Width = 500, Height = 500 };
    var header = window.Template.FindName("Header", window) as Grid;
    header.Background = Brushes.Red;

    Alternatively you can extract the ControlTemplate of RadWindow, modify the Background color of the Grid named Header and apply that template to the desired Window.

    Hope one of these solution will work for you.

    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