I have a observable collection that binds to a data grid. I also have in the view model a color property and I want to bind the background of each row in the data grid to the color property on the vm.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can bind the
Backgroundin theRowStyleforDataGridThis will work if
MyBackgroundis aBrush. You mention in your question that you have aColor, if this is the case you can use this instead