<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="SDKSample.SampleViewer" Title="Examples" > <Canvas> <Rectangle Height="150" Width="200" Stroke="Black" StrokeThickness="1" HorizontalAlignment="Left" Margin="10"> <Rectangle.Fill> <ImageBrush Viewport="0,0,50,50" ViewportUnits="Absolute" TileMode="Tile" ImageSource="c:image.png"/> </Rectangle.Fill> </Rectangle> </Canvas> </Window>