Mega Code Archive

 
Categories / C# / WPF
 

Image as Resource

<Window x:Class="Window1"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="Window1" Height="300" Width="300">     <Window.Resources>         <ImageBrush ImageSource="c:\image.jpg" x:Key="brSmile" />     </Window.Resources>     <Grid Background="{StaticResource brSmile}">              </Grid> </Window>