Change Button Background Color Through MVVM Pattern In WPF
Answer : You could bind the control's Background to a property on the viewmodel, the trick is to use an IValueConverter to return a Brush with the color you require. Here's an example that converts a boolean value from the viewmodel to a color: public class BoolToBrushConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) return Brushes.Transparent; return Convert.ToBoolean(value) ? Brushes.Red : Brushes.Transparent; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } with a binding expression like "{Binding Reviewed, Converter={StaticResource BoolToBrushConverter}}" where Reviewed is your boolean viewmodel property. Using triggers: <Button> <Button.Style> <Style Target...