添加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);
        }

github地址:GitHub - icsharpcode/AvalonEdit: The WPF-based text editor component used in SharpDevelop

你可能感兴趣的:(C#,C#)