Search This Blog

Showing posts with label Howto WPF Resources Images. Show all posts
Showing posts with label Howto WPF Resources Images. Show all posts

Wednesday, December 2, 2009

Embedding image resources in WPF

  1. Add an image file in project and set the build action to Resource.
  2. Define a resource in app.xaml or any other resource dictionary as
    <BitmapImage x:Key="MyImageSource" UriSource="/Images/Image.png" />
  3. Use the image resource
    <Image Source="{StaticResource MyImageSource}" />


http://stackoverflow.com/questions/347614/wpf-image-resources