views:

16

answers:

0

Hello,

I have a List of items in my ViewModel. Every Item represents a Row in a DataGrid. Every Row has a column with a RichTextBox as cell editor. I am searching data in the database. The ResultViewModel has the search word And the index of the column + row in the datagrid where the searched word is located.

Now I need a method in the ViewModel to highlight for example several words in several rows in the datagrid from the ViewModel. How can I do that?

Would an Attached Behaviour the way to go? like In the AB I would I would do the dirty stuff by searching the text in the RichTextBox and then highlight or set it as selected somehow.

What do you think?