Forum

C#, WPF, local reso...
 
Notifications
Clear all

C#, WPF, local resouce bitmap to imagesource

1 Posty
1 Users
0 Reactions
999 Widok
0
Topic starter

example

1 Answer
0
Topic starter
var handle = Properties.Resources.MY_BITMAP.GetHbitmap();
var bitmapImageSource = Imaging.CreateBitmapSourceFromHBitmap(handle, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
img_timer.Source = bitmapImageSource;

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: