本片介绍基于 AvalonEdit 实现一个支持语法高亮的 C# 编辑器
实现效果
语法高亮
点击编译
实现步骤
- 在VS中创建窗体应用程序。通过 Nuget 引用 AvalonEdit。
- 在窗体中引入控件 ElementHost。用来承载 AvalonEdit 中的 WPF 控件 TextEditor。
- 实例化并配置 TextEditor。将其放入 ElementHost 容器中
TextEditor editor = new TextEditor(
本片介绍基于 AvalonEdit 实现一个支持语法高亮的 C# 编辑器
语法高亮
点击编译
TextEditor editor = new TextEditor(