You can set the Foreground or Background properties of a control to a brush that will render the control using one of the predefined system colors. The SystemColors class contains a number of static SolidColorBrush objects representing brushes that match the system colors.
<Label Name="lblMA" Content="Margaret Atwood" HorizontalAlignment="Center" Padding="20,10" Margin="10" Background="LightPink"/> <Button Content="Change Color" HorizontalAlignment="Center" Padding="10,5" Click="Button_Click"/>
private void Button_Click(object sender, RoutedEventArgs e) { // Set to one of the predefined brushes that map // to the system colors lblMA.Background = SystemColors.ActiveCaptionBrush; }
Filed under: Controls Tagged: Background, Colors, Controls, Foreground, System Colors, WPF
![](http://pixel.wp.com/b.gif?host=wpf.2000things.com&blog=14605478&post=6958&subd=2000thingswpf&ref=&feed=1)