Silverlight XAML Primer 4, Listing 2

Creating vertical oriented gradient colors by changing the LinearGradientBrush's StartPoint and EndPoint attribute values

<Canvas xmlns="">
 <Rectangle Width="500" Height="500">
   <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
    <GradientStop Color="Purple" Offset="0.0" />
    <GradientStop Color="Red" Offset="0.25" />
    <GradientStop Color="Navy" Offset="0.50"/>
    <GradientStop Color="Yellow" Offset="0.75" />
    <GradientStop Color="Green" Offset="1.0" />
comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.