void UpdateUIColorValue()
        {
            if (value == "-" || DisableUIColor)
            {
                UIColor = UIColorValue.None;
                return;
            }

            UIColor = boolValue == triggerAlarmValue ? UIColorValue.Red : UIColorValue.Green;
        }
예제 #2
0
        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);
        }
예제 #3
0
 public static void SetUIColor(DependencyObject obj, UIColorValue value)
 {
     obj.SetValue(UIColorProperty, value);
 }