Live Chat Icon For mobile
Live Chat Icon

How do I host Windows Forms control in a WPF Window ?

Platform: WPF| Category: Window

Windows forms can be hosted using the WindowsFormsHost markup extension of the ‘windowsformsintegration.dll’. References for ‘windowsformsintegration.dll’ and ‘System.Windows.Forms.dll’ have to be added.

The following code snippet is used to add a control to the Windows Forms.

Note: windowsformsintegration.dll will be available in the following location,
Program files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsFormsIntegration.dll.

[XAML]

<WindowsFormsHost>
<wf:MaskedTextBox x:Name='mtxamt' Mask='00000.00'/>        </WindowsFormsHost>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.