InteropBitmap to BitmapImage
问题 I'm trying to Convert a Bitmap (SystemIcons.Question) to a BitmapImage so I can use it in a WPF Image control. I have the following method to convert it to a BitmapSource , but it returns an InteropBitmapImage , now the problem is how to convert it to a BitmapImage . A direct cast does not seem to work. Does anybody know how to do it? CODE: public BitmapSource ConvertToBitmapSource() { int width = SystemIcons.Question.Width; int height = SystemIcons.Question.Height; object a = System.Windows