I'm trying to set a WPF Image's source.

**XAML** works:

```
<Image Name="ImageThing"
       Source="images/Thing.png"/>

```

**Visual Basic** fails:

```
ImageThing.Source = "images/Thing.png"

```

…with this **exception**:

> 
> Value of type 'String' cannot be
>  converted to
>  'System.Windows.Media.ImageSource'.
> 
> 
> 

How do I create the System.Windows.Media.ImageSource that I need?

---

Update
------

This code adapted from an [MSDN example](http://msdn.microsoft.com/en-us/library/system.windows.controls.image.aspx) works:

```
Dim bmp As New BitmapImage()
bmp.BeginInit()
bmp.UriSource = New Uri("images/Thing.png", UriKind.Relative)
bmp.EndInit()
ImageThing.Source = bmp

```