|
|
Title | Display an image saved as a resource in WPF/XAML using Visual Basic 2008 |
Description | This example shows how to display an image saved as a resource in WPF/XAML using Visual Basic 2008. |
Keywords | WPF, XAML, Image, ImageSource, Pack, Visual Basic 2008 |
Categories | WPF, VB.NET |
|
|
Include the image file in the project and make sure it is set to Resource. Then loading the image into an Image control at run time is easy, once you figure out the bizarre syntax.
|
|
imgEarth.Source = New BitmapImage(New Uri("pack://application:,,,/Earth.jpg"))
|
|
|
|
|
|