Can I color different parts of text in a WPF TextBox?

后端 未结 2 1771
悲&欢浪女
悲&欢浪女 2021-02-11 17:36

I\'ve got a WPF TextBox into which my users type XHTML.

XAML...



        
2条回答
  •  情话喂你
    2021-02-11 18:07

    Like Kent said with a TextBox you're stuck with one color.

    Here is a small article on simple RTB syntax highlighting that should give you most of what you need.

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

提交回复
热议问题