WPF RichTextBox 使用行号创建编辑器

问题描述:

我正在为特定领域的语言创建一个文本编辑器.我使用 WPF RichTextBox 作为基本控件.我不知道如何优雅地包含行号.有谁知道任何例子?

I'm creating a text editor for a domain specific language. I'm using the WPF RichTextBox as the basic control. I don't know how to gracefully include line numbering. Does anyone know of any examples?

AvalonEdit 很好,而且是开源的.我认为它几乎具有 Aqistar 控件的所有功能,例如语法突出显示和折叠.易于配置和使用.可以在此处找到更多详细信息.

AvalonEdit is a good one, and it's open source. I think it has nearly all of the features of the Aqistar control such as syntax highlighting and folding. Ease to configure and use. Further details can be found here.