Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个绑定到对象列表的数据网格。
根据问题域,我知道我将始终有 7 行和 8 列。
如何设置特定行或特定列的背景样式。
我尝试使用特定触发器编写样式,但这在 Silverlight 中似乎无效,只有 wpf
谢谢
你可以做这样的事情
private void dataGrid1_LoadingRow(object sender, DataGridRowEventArgs e) { if (Your condition) { e.Row.Background = new SolidColorBrush(Colors.Green); } }