Iam trying to load a WPF on to Window Forms.
I have created a control created using XAML and I have the project compiled with the 'Output Type' as 'Class Library'.
I have another project that displays Windows Form.
Iam adding the dll of the WPF control in the add reference of this project.
(The directory structure is also fine.)
When I complie and run the project, i have the runtime error.
"System.IO.FileNotFoundException: Could not load file or assembly ' XXX, Version=1.0.3219.20825, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: XXX, Version=1.0.3219.20825, Culture=neutral, PublicKeyToken=null'
at MainWindow_Load(Object sender, EventArgs e) "
The code of my Window_Load looks like this.
private MyControls.Page1 wpfAddressCtrl;
private void MainWindow_Load(object sender, EventArgs e)
ctrlHost = new ElementHost();
ctrlHost.Dock = DockStyle.Fill;
wpfAddressCtrl = new MyControls.Page1(); //(Page1 is the class name in MyControls project)
ctrlHost.Child = wpfAddressCtrl;
Could any one solve this problem.?
Thanks in Advance