In my GridView I color rows differently based on the current value of a Combobox column. Each change of the combobox value triggers the PropertyChanged event of the business object.
This works just fine as long as I return one of my own styles in SelectStyle. The row gets correctly drawn using that style.
The problem is, that I want to reset the row style to default (= no style) for one particular combobox value. In this case SelectStyle returns base.SelectStyle(item, container) which is always null (= OK). But the row remains drawn using the previous style although the PropertyChanged event is correctly triggered. If I force the UI to recreate the UI controls of that row (by manually resizing the window), the row is drawn correctly.
What am I missing?
Can I force a redraw of that row to remove the previous style other than by triggering the PropertyChanged event?
I could create my own "Empty Style", but this is what I want to avoid. Any ideas?
Thanks for any help.
Markus
This works just fine as long as I return one of my own styles in SelectStyle. The row gets correctly drawn using that style.
The problem is, that I want to reset the row style to default (= no style) for one particular combobox value. In this case SelectStyle returns base.SelectStyle(item, container) which is always null (= OK). But the row remains drawn using the previous style although the PropertyChanged event is correctly triggered. If I force the UI to recreate the UI controls of that row (by manually resizing the window), the row is drawn correctly.
What am I missing?
Can I force a redraw of that row to remove the previous style other than by triggering the PropertyChanged event?
I could create my own "Empty Style", but this is what I want to avoid. Any ideas?
Thanks for any help.
Markus