Exemple #1
0
 public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(new SolidColorBrush((bool)value ? (Color)ColorConverter.ConvertFromString("#FF84BB96") : Colors.Yellow));
 }
Exemple #2
0
 internal static Color ColorFromHex(string colorHex)
 {
     return((Color?)ColorConverter.ConvertFromString(colorHex) ?? Colors.Transparent);
 }