I convert code from WPF to Winforms. Does winforms have an Image control instead of a picture box image. WPF has an Image control where I am trying to capture an image. I am getting an error trying on the code below.
Error: you cannot convert System.Windows.Media.ImageSource to PictureBox. How to achieve this in winforms
pbImage.Image = (ImageSource)ImageSource; // Error

Sundaram SubramanianRank #150 · 15.2K reputationPosted Aug 9, 2017, 6:02 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Aug 9, 2017, 11:16 PM EDT
Kailash Polai195 reputationPosted Aug 11, 2017, 11:37 PM EDT
Maen BadwanRank #2,520 · 556 reputationPosted Aug 17, 2017, 4:39 AM EDT
https://stackoverflow.com/questions/1201518/convert-system-windows-media-imagesource-to-system-drawing-bitmap
But if you are looking for more advanced .NET WinForm image viewer control, you can check the ImageViewer control from LEADTOOLS:
https://www.leadtools.com/help/leadtools/v19m/dh/c/imageviewer.html
This control (class) provides many advanced features that can help you to view and control images display in your WinForms application.
Also, the RasterImageConverter class provides methods that can help you to convert a Leadtools.RasterImage object to and from Windows Presentation Foundation (WPF). More details can be found here:
https://www.leadtools.com/help/leadtools/v19m/dh/wm/rasterimageconverter.html
Manikandan MurugesanRank #300 · 8.4K reputationPosted Aug 9, 2017, 6:02 PM EDT
On the other hand, you can also add the BackgroundImage by using the Visual Studio.
Best Regards