I have a TextBox and ListBox. User can search ListBox elements from TextBox.
ListBox is bound to CollectionViewSource.
CollectionViewSource has Filter event handler, that filters elements based on text that user enters into TextBox.
My requirement is to highlight user entered text within TextBlock of ListBoxItem elements.
I was thinking of breaking TextBlock into several Runs objects and modify Background property of Run objects that need to be highlighted.
I think it is not possible to do with DataTemplates.
Is there easy way to accomplish this?