添加AvalonEdit控件到WinForm
public frmTest()
{
InitializeComponent();
ElementHost host = new ElementHost();
host.Size = new Size(200, 100);
host.Location = new Point(100, 100);
ICSharpCode.AvalonEdit.TextEditor edit = new ICSharpCode.AvalonEdit.TextEditor();
host.Child = edit;
this.Controls.Add(host);
}