WPF - converting Bitmap to ImageSource
问题 I need to convert a System.Drawing.Bitmap into System.Windows.Media.ImageSource class in order to bind it into a HeaderImage control of a WizardPage (Extended WPF toolkit). The bitmap is set as a resource of the assembly I write. It is being referenced like that: public Bitmap GetBitmap { get { Bitmap bitmap = new Bitmap(Resources.my_banner); return bitmap; } } public ImageSource HeaderBitmap { get { ImageSourceConverter c = new ImageSourceConverter(); return (ImageSource) c.ConvertFrom