I have little bit different approach with using SetterValueBindingHelper:
xmlns:utils="using:Syncfusion.UI.Xaml.Utils"
<Style x:Key="rowStyle" TargetType="sfDataGrid:VirtualizingCellsControl">
<Setter Property="utils:SetterValueBindingHelper.PropertyBinding">
<Setter.Value>
<utils:SetterValueBindingHelper Property="Background" Binding="{Binding Converter={StaticResource DataGridCellBackgroundConverter}}"/>
</Setter.Value>
</Setter>
...
</Style>
Converter:
public class DataGridCellBackgroundConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string culture)
{
if (value is Command)
{
MyClass item = value as MyClass;
return new SolidColorBrush(item.IsActive ? Colors.LightGreen : Colors.Gray);
}
return new SolidColorBrush(Colors.White);
}
public object ConvertBack(object value, Type targetType, object parameter, string culture)
{
throw new NotImplementedException();
}
}