I am looking for some control that can do following 2 :
1.highlight some of the text in different colors.
- easy databind.
checked r开发者_运维技巧ichtextbox - but it is hard to databind with it.
checked textbox but it problem to text hight light with it.
any suggestions
Use the RichTextBox - or even better the Extended RichTextBox here (it allows easy DataBinding): http://wpftoolkit.codeplex.com/wikipage?title=RichTextBox.
If you don't want to have to include another control you can create an AttachedProperty to make it possible to bind to the built in RichTextBox. Check this out here: http://michaelsync.net/2009/06/09/bindable-wpf-richtext-editor-with-xamlhtml-convertor
精彩评论