void UpdateUIColorValue() { if (value == "-" || DisableUIColor) { UIColor = UIColorValue.None; return; } UIColor = boolValue == triggerAlarmValue ? UIColorValue.Red : UIColorValue.Green; }
public object Convert(object value, Type targetType, object parameter, string language) { UIColorValue type = (UIColorValue)value; foreach (var brush in Brushes) { if (Ext.GetUIColor(brush) == type) { return(brush); } } return(null); }
public static void SetUIColor(DependencyObject obj, UIColorValue value) { obj.SetValue(UIColorProperty, value); }