rajat
rajat

Reputation: 3553

Embedding a Windows Form into a WPF application

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 ?

Upvotes: 16

Views: 20678

Answers (2)

MatthiasG
MatthiasG

Reputation: 4532

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.

Upvotes: 4

Jason Down
Jason Down

Reputation: 22171

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

Upvotes: 16

Related Questions