From MSDN article I found out that WinForm controls can be hosted in a WPF application using HwndHost.
Also, from other internet resources, I found that WPF is rendered using DirectX and WinForm is rendered using GDI+.
My question is, what renders a WinForm control when the WinForm control is drawn in a WPF application; DirectX, GDI+, or both?
I have very little experience with both technologies and making baby steps.
Thank you
You are incorrect about requiring a
HwndHostto display a Windows Forms control in a WPF Application. The article that you were reading is for Win32 Interoperation, not for Windows Forms. To use a Windows Forms control in a WPF Application, you should use theWindowsFormsHostClass.As for what will render the Windows Forms control, you need to understand something. WPF uses a totally different graphics system to Windows Forms. From the WPF Graphics Rendering Overview page on MSDN:
Therefore in general, the WPF Rendering system will render the
WindowsFormsHost, although you may find that Windows Forms does actually perform some rendering of its own on the Windows Forms control.