Fill = new SolidColorBrush(Color.FromRgb(0, 0, 255))
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="" Height="300" Width="300">
<Canvas>
<TextBlock Text="Brush from RGB Color [ .Fill = new SolidColorBrush(Color.FromRgb(0, 0, 255)); ]"/>
<Rectangle HorizontalAlignment="Left" Width="60" Height="20">
<Rectangle.Fill>
<SolidColorBrush>
<SolidColorBrush.Color>
<Color A="255" R="0" G="0" B="255" />
</SolidColorBrush.Color>
</SolidColorBrush>
</Rectangle.Fill>
</Rectangle>
</Canvas>
</Window>
Related examples in the same category