I had trouble at first with setting the colors for a WPF applications controls.
It appears it does not include System.Windows.Media
by default but does include Windows.UI.Xaml.Media
, which has some pre-filled colors.
I ended up using the following line of code to get it to work:
grid.Background.SetValue(SolidColorBrush.ColorProperty, Windows.UI.Colors.CadetBlue);
You should be able to change grid.Background
to most other controls and then change CadetBlue
to any of the other colors it provides.