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.
相关问题
- VNC control for WPF application
- How do I bind a DataGridViewComboBoxColumn to a pr
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- How can I add a horizontal line (“goal line”) for
You can bind the
Background
in theRowStyle
forDataGrid
This will work if
MyBackground
is aBrush
. You mention in your question that you have aColor
, if this is the case you can use this instead