Jan 11, 2012 at 8:22 AM
Edited Jan 11, 2012 at 8:24 AM
After a bit of guddling about (I'm new to WPF) I got this working. Here are the approximate steps:
Add a reference to ScintillaNet in your assembly references.
ScintillaNet is a Windows Forms control not WPF so you will have to host it in a Windows Form Host. So put this in your XAML file:
Add the ScintillaNet namespace to your XAML file so that you can use objects within it:
In the XAML (because the designer is going to breakpretty quickly plus because it's a windows form control it doesn't seem to show up in the toolbox) add a Scintilla object in between the Windows form host tags so that it is "hosted":
That's you good to go but your designer is probably broken. As per anytime you use Windows Forms Host objects you need to access it's hosted control using the Child property and cast it to the specific type:
Scintilla scintilla = (Scintilla)wfh.Child.
Hope these steps work for you. I've had to modify them slightly from how I am actually doing it due to a layer of inheritance I am using.