Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Draws a 100 by 50 rectangle with a solid blue fill, a black outline, and rounded corners

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     x:Class="Microsoft.Samples.Graphics.RectangleExample"     WindowTitle="Rectangle Example">   <Canvas Width="120" Height="200" >   <Rectangle     Width="100"     Height="50"     Fill="Blue"     Stroke="Black" StrokeThickness="4"     RadiusX="20" RadiusY="20"     Canvas.Left="10"     Canvas.Top="100"/> </Canvas> </Page>