Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content

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.

  Class Description
Public class ChildChangedEventArgs Provides data for the WindowsFormsHost.ChildChanged and ElementHost.ChildChanged events.
Public class ElementHost A Windows Forms control that can be used to host a Windows Presentation Foundation (WPF) element. 
Public class IntegrationExceptionEventArgs Provides a base class for EventArgs classes which support optionally raising exceptions.
Public class LayoutExceptionEventArgs Provides data for the LayoutError event.
Public class PropertyMap Provides a way to translate property values between Windows Forms controls and Windows Presentation Foundation (WPF) elements.
Public class PropertyMappingExceptionEventArgs Provides data for the PropertyMappingError event.
Public class WindowsFormsHost An element that allows you to host a Windows Forms control on a WPF page.

  Delegate Description
Public delegate PropertyTranslator Provides a translation function for a mapped property of the host control.
© 2015 Microsoft