System Brushes
The SystemColors class provides support for system colors,
system brushes, and system resource keys that correspond to system display
elements. The SystemBrushes class has a static property for each of these
elements. The system colors properties are represented by a Color structure.
The color properties are represented by a SolidColorBrush object. The resource
properties are represented by a ResourceKey object.
SystemBrushes are used as static resources. The following
code snippet is used fills a Rectangle with a MenuBrush.
<Rectangle Width="200" Height="100"
Fill="{x:Static SystemColors.MenuBrush}">
</Rectangle>
The following code snippet creates and fills a rectangle
with a system brush dynamically.
private void CreateARectangleWithSystemBrushes()
{
Rectangle
rect = new Rectangle();
rect.Width = 200;
rect.Height = 100;
rect.Fill = SystemColors.MenuBrush;
LayoutRoot.Children.Add(rect);
}