Hi all,
How would I initialize a BitmapImage using a bitmap in the project resources
folder?
I know I can use the following to do this, but I wondered if there was some
more abstract method using My.Resources namespace.
Dim bi As New BitmapImage()
' BitmapImage.UriSource must be in a BeginInit/EndInit block.
bi.BeginInit()
bi.UriSource = New Uri("MyFilePath\bitmap1.bmp",
UriKind.RelativeOrAbsolute)
bi.EndInit()
I muddled around a bit with
My.Resources.ResourceManager.GetStream("Bitmap1.bmp"), which returns an
UnmanagedMemoryStream, but can't quite get that to work out.
Any suggestions would be greatly appreciated.
--
John


