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

Change BackgroundColor of RadWindow Theme="Windows8"

1 Answer 288 Views
Window
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 26 May 2014, 12:49 PM
Hi,

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
Regards
Rene

1 Answer, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 27 May 2014, 10:59 AM
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:
http://www.telerik.com/help/wpf/common-styles-appearance-colorizing-metro-theme.html

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 };
window.Show();
 
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.

Regards,
Kalin
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
Window
Asked by
ITA
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or