Reputation: 39988
I want to change the Accent color in my whole application to a custom color.
Currently it's coming whatever is selected in "Settings"
Also need to change the default background color for pages
Upvotes: 1
Views: 2618
Reputation: 39988
You can put this in App.xml.cs
constructor
//This will change the default accent color
(App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush).Color = Colors.Green;
//This will change the default background color for pages
(App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.White;
//other code
Similarly you can change the other Brush/Color specified in Theme resources for Windows Phone
Upvotes: 2