Mega Code Archive

 
Categories / VB.Net / WPF
 

Multiple gradient stops

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       HorizontalAlignment="Center" VerticalAlignment="Center">               <Rectangle Width="80" Height="60">           <Rectangle.Fill>             <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">               <GradientStop Color="Black" Offset="0" />               <GradientStop Color="Orange" Offset="0.2" />               <GradientStop Color="Red" Offset="0.4" />               <GradientStop Color="Black" Offset="0.6" />               <GradientStop Color="Yellow" Offset="0.8" />               <GradientStop Color="Red" Offset="1" />             </LinearGradientBrush>           </Rectangle.Fill>         </Rectangle> </Page>