Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

ImageBrushs tiles are set to 50% by 50% of the output area

<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     x:Class="Microsoft.Samples.Graphics.UsingImageBrush.TilingExample" >   <Grid Margin="20">     <Rectangle           Grid.Row="6" Grid.Column="0"       Width="200" Height="150"       Stroke="LimeGreen" StrokeThickness="1" HorizontalAlignment="Left">       <Rectangle.Fill>         <ImageBrush           Viewport="0,0,0.5,0.5"           TileMode="Tile"           AlignmentX="Left"           AlignmentY="Top"           ImageSource="c:\image.jpg" />       </Rectangle.Fill>     </Rectangle>   </Grid> </Page>