Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

A rectangle with a linear fill

<Window    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   Title="SolidColorBrush Animation Example"   Background="White">      <StackPanel>     <Rectangle RadiusX ="15" RadiusY ="15" Height ="40" Width ="100">       <Rectangle.Fill>         <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">           <GradientStop Color="LimeGreen" Offset="0.0" />           <GradientStop Color="Orange" Offset="0.25" />           <GradientStop Color="Yellow" Offset="0.75" />           <GradientStop Color="Blue" Offset="1.0" />         </LinearGradientBrush>       </Rectangle.Fill>     </Rectangle>   </StackPanel> </Window>