The Opacity Mask Use the opacity mask brush as a fill to show what it looks like
<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>
Related examples in the same category