Shalvin Interests

Showing posts with label WPF Brushes. Show all posts
Showing posts with label WPF Brushes. Show all posts

Tuesday, May 3, 2011

Silverlight, WPF Brushes

SolidColorBrush LinearGradientBrush and RadialGradientBrush
<Rectangle Height="94" HorizontalAlignment="Left" Margin="57,42,0,0" Name="rectangle1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="201">
<Rectangle.Fill>
    <SolidColorBrush Color="Blue"/>
  
</Rectangle.Fill>

</Rectangle>
<Rectangle Height="92" HorizontalAlignment="Left" Margin="309,41,0,0" Name="rectangle2" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="210">
<Rectangle.Fill>
    <LinearGradientBrush>
        <GradientStop Color="Blue" Offset="0"/>
        <GradientStop Color="Red" Offset="1"/>
    </LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>

<Rectangle Height="80" HorizontalAlignment="Left" Margin="58,172,0,0" Name="rectangle3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="201">
<Rectangle.Fill>
    <RadialGradientBrush>
        <GradientStop Color="Blue" Offset="0"/>
        <GradientStop Color="Red" Offset="1"/>
    </RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>