Stretch = UniformToFill

image_pdfimage_print
   
    

<Window x:Class="Chapter05.ImageBrushExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Chapter05" Height="300" Width="300">
      <StackPanel Margin="5" Grid.Column="1" Grid.Row="1">
        <TextBlock Margin="5" Text="Stretch = UniformToFill" />
        <Button Width="135" Height="100">
          <Button.Background>
            <ImageBrush ImageSource="c:image.jpg" Stretch="UniformToFill" />
          </Button.Background>
        </Button>
      </StackPanel>
</Window>