2. Use this code:
Assembly myAssembly = Assembly.GetExecutingAssembly();
Stream myStream = myAssembly.GetManifestResourceStream("WpfApplication1.testimage.png");
PngBitmapDecoder bd = new PngBitmapDecoder
(myStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
Image1.ImageSource = bd.Frames[0];
No comments:
Post a Comment