I have an image in a the clipboard ( a bitmap ) which I am pulling from the clipboard as follows
datObj = Clipboard.GetDataObject();
InteropBitmap pdfBitmap = datObj.GetData(DataFormats.Bitmap) as InteropBitmap;
How do I get this pdfBitmap to show up in a WPF listbox. THw WpfListBox looks so..
<ListBox ItemsSource="{Binding Path=Pages}">
<ListBox.ItemTemplate>
<DataTemplate>
<Image Margin="10" Source="{Binding Path=UriSource}"></Image>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
and the binding is to an
private ObservableCollection<BitmapImage> pages = new ObservableCollection<BitmapImage>();
I want to first scale the interopbitmap ( something akin to the getthumbnailimage() ) and then I need to somehow turn the interopbitmap into a BitmapImage .
Thanks