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.
Related videos on Youtube
Author by
rajat
Updated on September 15, 2022Comments
-
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 almost 12 yearsCan i transfer data between wpf and embeded WinForm using WindowsFormHost ?
-
Security Hound almost 12 years@rajat - Yes.
WindowsFormHost
works just like aUserControl
of course it sounds like it would be fair easier just to convert your application.