namespace Common.UI.Infrastructure { using System; using System.Globalization; using System.Windows.Data; using System.Windows.Media; public class BooleanToBorderConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var converter = new BrushConverter(); if (value is bool success) { if (!success) { return converter.ConvertFrom("#BBFCBA03"); } else { return converter.ConvertFrom("#BB90EE90"); } } else { return Brushes.LightGray; } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotImplementedException(); } }