Embedding a Windows Form into a WPF application

19,328

Solution 1

You'll want to use a WindowsFormsHost. Check this tutorial out (shows how to do WPF in WinForms and vice versa).

Solution 2

You can use the WindowsFormsHost to add single Forms into an WPF application. If this is enough for your purposes have a look at this walkthrough.

Share:
19,328

Related videos on Youtube

rajat
Author by

rajat

Updated on September 15, 2022

Comments

  • rajat
    rajat over 1 year

    I have a Old windows form application and i don't want to convert it to wpf , i want to embed it inside my wpf application main window . How can i do this ?.

    Also , How Can i transfer text between wpf and embeded WinForm using WindowsFormHost ?

  • rajat
    rajat almost 12 years
    Can i transfer data between wpf and embeded WinForm using WindowsFormHost ?
  • Security Hound
    Security Hound almost 12 years
    @rajat - Yes. WindowsFormHost works just like a UserControl of course it sounds like it would be fair easier just to convert your application.