Mega Code Archive

 
Categories / VB.Net / WPF
 

Buttons Background = ImageBrush The resulting button has an image as its background

<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">     <Button Grid.Row="3" Grid.Column="2"       Height="75" Width="100" Foreground="White" FontWeight="Bold"      HorizontalAlignment="Left">       A Button       <Button.Background>         <ImageBrush ImageSource="c:\image.jpg" />       </Button.Background>     </Button>   </Grid> </Page>