0

我有一个绑定到对象列表的数据网格。

根据问题域,我知道我将始终有 7 行和 8 列。

如何设置特定行或特定列的背景样式。

我尝试使用特定触发器编写样式,但这在 Silverlight 中似乎无效,只有 wpf

谢谢

4

1 回答 1

0

你可以做这样的事情

private void dataGrid1_LoadingRow(object sender, DataGridRowEventArgs e)
        {

                if (Your condition)
                {
                    e.Row.Background = new SolidColorBrush(Colors.Green);
                }

        }
于 2013-10-07T11:51:12.937 回答