The problem is not related to the interoperability between WPF and
System.Windows.Forms
. This problem is very complex, and the problem with circular dependencies is very simple. You should just avoid circular references between assemblies. You can have a separate assembly referenced by other two. As you did not show your code, that's all one can tell you.
As to the loading a form from WPF application, this is generally impossible. It's the best to avoid mixing WPF and Forms. Interoperability does exist, but it is designed to host a Forms control in WPF UI or a WPF control in Forms UI:
http://msdn.microsoft.com/en-us/library/ms751761.aspx[
^],
http://msdn.microsoft.com/en-us/library/ms742215.aspx[
^].
You cannot host a form, but you can do the following: put all content of a form into a panel and host this panel; but better design some control (possibly
UserControl
) to better fit the WPF design.
There is also an esoteric and very little known possibility to run two different UIs in two different threads of the same process, but it hardly be good enough, because communication between the two would be extremely limited.
Overall, avoiding to mix WPF and Forms in one process would be the very best thing.
—SA