Change the background color of a Row in a listview when I vary the contents of a control bound to it?

Several solutions that you can choose If you want to change in a small set of colors, use DataTrigger at XAML. (note that the code below is not tested) ListViewItem> This is not recommended because you need to write at code-behind.

Several solutions that you can choose. If you want to change in a small set of colors, use DataTrigger at XAML. (note that the code below is not tested) Use DataTemplateSelector for more complex color selection.

A good reference is: switchonthecode.com/tutorials/wpf-tutori... Use event handler at the ItemTemplate. This is not recommended because you need to write at code-behind.

Thanks for your quick answer. I will try it now and then I tell if there is any problem – Dan Delay Nov 4 at 11:59 Ok. I am testing this solution but I found some problems: 1.

The style should be setted in a GridViewColumn or in a ListViewItem? – Dan Delay Nov 4 at 12:26 Please try at ListViewItem. It will give a scope of row decoration.

I will edit my answer as well. – Youngjae Nov 4 at 14:00 arrrrrg. I can't find the right answer to my question.

I know that I need to use DataTrigger but I don't know how can use it, for example, in a resource dictionary. ALL of my ListViewItems must implement this DataTrigger for ALL the textBoxes binded to it. Thank you very much for all the efforts – Dan Delay Nov 4 at 17:05 Hardly understand your GUI and interaction requirement.

Resource dictionary is just a refactoring issue. I mean, if you achieve your requirements inside of a ListViewItem. Style as above code, you surely packed up the Style elements to the resource dictionary.

– Youngjae Nov 47 at 3:16.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions