WPF Select text + Highlight
I have a ListView with a Binding Property with {get;set;} Name ( type string ) and each one is binding in WPF textblock.
First requirement be able to select a path of the text using cursor and to copy with Ctrl+C (This can be done with textBox). Second requirement is to highlight programmatically any part of Name which contains a string, and this should be able to highlight all name开发者_开发知识库s in that list (this can be done with textblock with inlines). Question: how i can combine these two ?Sounds like you want RichTextBox. It contains inlines, like TextBlock does, but it also supports highlighting and copying.
精彩评论