How can I add this WPF control into my WinForm?
I know that I must use an ElementHost to display a WPF control in a WinForm, but as the WPF control is third party software and it only comes with an XML file and a DLL file. The control is AvalonEdit , I added both the ICSharpCode.AvalonEdit.xml and ICSharpCode.AvalonEdit.dll files to my project, and I went to Project -> Add Reference and added the DLL as a reference. Now I can access the ICSharpCode namespace in my code, all of the classes and methods are exposed, but from this point I am unsure how to actually use the control in my WinForm. I was expecting a WPF control to appear in the