I’m looking for a way to highlight (not select) words based on search terms inside a Windows.UI.Xaml.Controls.TextBox control.
There doesn’t seem to any way to override the text rendering behaviour? Can this be done with the textbox control?
Edit:
I was originally trying to use the RichEditBox but was having a problem with being able to paste in formatted text which I was trying to prevent (the only event I can clear the formatting on is TextChanged which seems a little late). I also really need more control over the rendering of the highlights
Textboxes are very limited in regards to formatting and text selection.
You might want to use the RichTextBox control rather than a TextBox as it gives you greater selection and formatting capabilities to make highlighting multiple terms easier.
Here’s a quick start: http://www.devx.com/dotnet/Article/34644