添加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地址:https://github.com/icsharpcode/AvalonEdit

posted @ 2021-02-05 10:20  天天代码码天天  阅读(55)  评论(0编辑  收藏  举报  来源