Example #1
0
 public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     if (value == null)
     {
         return(null);
     }
     return(StaticObjectConverter.GetObjectByPropertyName <SolidColorBrush>(typeof(Brushes), value.ToString()).Color);
 }
Example #2
0
 public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     return(StaticObjectConverter.GetNameByObj(typeof(Brushes), value, "Color"));
 }