DataGrid MVVM中的DataGridRow

时间:2016-03-06 11:54:41

标签: c# xaml mvvm binding datagrid

如何使用MVVM更改DataGrid中的行颜色?

<DataGrid x:Name="dataGrid" AutoGenerateColumns="False"  SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}" SelectedItem="{Binding SelectedAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding students1}">

我有财产

 public Model.Student SelectedAction { get; set; }
 public int SelectedIndex { get; set; }

如何更改所选项目的DataGrid行颜色?

0 个答案:

没有答案