Mega Code Archive

 
Categories / VB.Net / WPF
 

Panels Background property with an ImageBrush

<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">     <DockPanel Grid.Row="3" Grid.Column="4" Width="200"      HorizontalAlignment="Left">       <DockPanel.Background>         <ImageBrush ImageSource="c:\image.jpg" />       </DockPanel.Background>       <TextBlock DockPanel.Dock="Top" Foreground="White" TextWrapping="Wrap" Margin="10">This DockPanel has an image as its background.</TextBlock>     </DockPanel>   </Grid> </Page>