Pergunta

Como definir a Fonte de System.Windows.Controls.Image se a Fonte for um tipo de System.Windows.Interop.InteropBitmap?Informações do InteropBitmap abaixo:

{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

Obrigado

Foi útil?

Solução

Parece InteropBitmap herda de ImageSource já.Você deveria ser capaz de fazer myImage.Source = myInteropbitmap; ?

Referência:

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

InteropBitmap para BitmapImage

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top