The incredibly awesome AvalonEdit WPF TextEditor control seems to lack an important feature, or at least i can\'t figure it out. Given an offset and a length, highli
Some background info: AvalonEdit is a code editor, not a rich text editor. There is no such thing as "highlight a portion of the document" - the document only stores plain text.
Highlighting is computed on-demand, only for the lines currently in view. If you want custom highlighting, you need to add a step to the highlighting computation - this is what the ColorizeAvalonEdit class in the example posted by mzabsky is doing.