如何设置系统的来源。窗户。控制。图像,如果源是一种类型的系统。窗户。互操作。互操作映射?下面的互操作映射信息:

{System.Windows.Interop.InteropBitmap}
[System.Windows.Interop.InteropBitmap]: {System.Windows.Interop.InteropBitmap}
base {System.Windows.Media.ImageSource}: {System.Windows.Interop.InteropBitmap}
DpiX: 96.0
DpiY: 96.0
Format: {Bgra32}
Height: 851.0
IsDownloading: false
Metadata: null
Palette: null
PixelHeight: 851
PixelWidth: 900
Width: 900.0

谢谢!

有帮助吗?

解决方案

它看起来像 InteropBitmap 继承自 ImageSource 已经。你应该能做到 myImage.Source = myInteropbitmap; ?

参考书:

http://msdn.microsoft.com/en-us/library/system.windows.interop.interopbitmap.aspx

InteropBitmap到BitmapImage

http://msdn.microsoft.com/en-us/library/system.windows.controls.image.source.aspx

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top