I’m trying to tie the background of each data cell with a property of the object they are associated with. Right now, I set the background of the cell as a side effect of the validation process, which works well but is more difficult to maintain as new ways to manipulate the data items are added to the project. I would prefer to do it using binding so I only have to write it once and then it will take care of itself.
Here’s what I’m trying to do more specifically. My data item has several properties like “Title”,”FileName”,”Album”. It will also have either a list of modified properties, or several boolean values like “FileNameChanged”, “AlbumChanged”, etc. (whichever solution is easier). If I have a column of “Title”, I want each cell in that column to look at the “TitleChanged” property or in the list of changed properties of its particular data item, and based on that select which background it has. If I update the property through some other means (thus changing the boolean property or adding a property to the list), I want the background to automatically change. I assume this will require some sort of binding and a converter between the data item and the cell background, but I can’t figure out how best to put it together.
Imported from legacy forums. Posted by Nisarg (had 1938 views)