Syntax Highlighter for WPF

六眼飞鱼酱① 提交于 2019-11-30 03:58:21

问题


I'm currently looking for a Syntax highlighter for a WPF application. A textbox will be available for the user to type into which would hopefully recognise code and highlight syntax accordingly.

I would like to support C# initialy and other languages later.

Duplicate of Question 394751


回答1:


I think this question has your answer.

Anyone know a code editor I can embed in a WPF window or Windows forms?

Or you can write one yourself: http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx




回答2:


Some time ago i've found this blog post with a tutorial on how to create a custom syntax highlight control from a RichTextBox. Maybe it could be usefull for you too.




回答3:


If you do not mind having no documentation whatsoever, AvalonEdit is a good choice. I am currently using for a project, and it is a great tool. I have not encountered a single bug even in complex scenarios.




回答4:


I was looking for the same thing without success. Only solution I found is Actipro's Syntax Highlighter for WinForms that can be hosted in WPF application. AFAIK Actipro is working on WPF version but I don't know if it ready or not



来源:https://stackoverflow.com/questions/454872/syntax-highlighter-for-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!