How to change selected row color dynamically in silverlight datagrid. I was trying this code but its notworking...
SampleConverter
bgConverter = new SampleConverter();
Binding binding = new Binding("IsChecked") { Mode = BindingMode.TwoWay, Converter = bgConverter, ValidatesOnExceptions = true };
DataGridRow objRow = GetDataGridRowByDataContext(dg, dg.SelectedItem);
if (objRow != null && objRow.IsValid)
{
objRow.SetBinding(
DataGridRow.BackgroundProperty, binding);
objRow.UpdateLayout();
dg.UpdateLayout();
}