System.Windows.Forms.Integration Namespace

Contains classes that support interoperation of Windows Forms and WPF controls.

The System.Windows.Forms.Integration namespace contains classes that enable interoperation between the Windows Forms and WPF technologies. When you use System.Windows.Forms.Integration classes, you can host Windows Forms controls on WPF pages, and WPF elements in Windows Forms-based applications.

The two key classes that implement interoperation capabilities are WindowsFormsHost and ElementHost. Which class you use depends on your control implementation:

  • Use the WindowsFormsHost class when you must use a Windows Forms control on a WPF page.

  • Use the ElementHost class when you must use a WPF element in a Windows Forms-based application.

Public classChildChangedEventArgsProvides data for the WindowsFormsHost.ChildChanged and ElementHost.ChildChanged events.
Public classElementHostA Windows Forms control that can be used to host a Windows Presentation Foundation (WPF) element.
Public classIntegrationExceptionEventArgsProvides a base class for EventArgs classes which support optionally raising exceptions.
Public classLayoutExceptionEventArgsProvides data for the LayoutError event.
Public classPropertyMapProvides a way to translate property values between Windows Forms controls and Windows Presentation Foundation (WPF) elements.
Public classPropertyMappingExceptionEventArgsProvides data for the PropertyMappingError event.
Public classWindowsFormsHostAn element that allows you to host a Windows Forms control on a WPF page.

Public delegatePropertyTranslatorProvides a translation function for a mapped property of the host control.