System.Windows.Forms.Integration Namespace

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

Classes

ChildChangedEventArgs

Provides data for the ChildChanged and ChildChanged events.

ElementHost

A Windows Forms control that can be used to host a Windows Presentation Foundation (WPF) element.

IntegrationExceptionEventArgs

Provides a base class for EventArgs classes which support optionally raising exceptions.

LayoutExceptionEventArgs

Provides data for the LayoutError event.

PropertyMap

Provides a way to translate property values between Windows Forms controls and Windows Presentation Foundation (WPF) elements.

PropertyMappingExceptionEventArgs

Provides data for the PropertyMappingError event.

WindowsFormsHost

An element that allows you to host a Windows Forms control on a WPF page.

Delegates

PropertyTranslator

Provides a translation function for a mapped property of the host control.

Remarks

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.