C # Syntax highlighting in WPF

I found a tutorial for syntax highlighting in RichEdits for WPF:

http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx

But if I open the list of commands from a file, Editbox will become very slow ... maybe there are too many words to highlight.

I read that WPF elements like RichEdit are much slower than WinForms elements.

How can I make my WPF RichEdit faster OR include Winforms RichEdit in my WPF?

+3
source share
1 answer

I wrote a similar syntax shortcut in .NET 1.1, and the performance is terrible. I have not reviewed this issue for many years, but it seems to me that there should be a better way.

, RTF. / , . " ()", cfN csN. , . RegEx .

, Threading .

.

+2

Source: https://habr.com/ru/post/1708275/


All Articles