Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Positioning Rectangle on a Canvas

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="100">     <Border BorderBrush="Black" BorderThickness="1">       <Grid>         <Rectangle Margin="20, 10, 0, 0" Fill="Green" Width="80" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" />       </Grid>     </Border> </Page>