1
votes

We have an existing Legacy Winforms application which is old and hard to maintain. So we decided to re-write the application using WPF. Due to lack of resource, we plan to have a hybrid type, where new features will be developed in WPF and over the course of time will migrate everything from Winforms to WPF.

Now the problem is, how can we integrate WPF application that uses MVVM framework to be launched from Winforms application. I tried "ElementHost" control to host WPF application. But I dont know how to achieve it with MVVM framework. Tried with Caliburn.Micro and getting an null exception when the BootStrapperBase.Initialize() method is called.

Please advice.

1
Do you mean exactly databinding?Pavan Chandaka
Nope. I mean launching/Hosting Wpf applicatoin from Winforms application.Raajkumar

1 Answers

1
votes

After reading the Caliburn documentation see here, there is an option where we can pass “false” to the base constructor’s “useApplication” parameter. This worked for me.

This launches the application. I tried playing around passing a reference to the WPF applicaton which contains event and method.