Account.DailyManagement.View.ForegroundConverter.Convert C# (CSharp) Méthode

Convert() public méthode

public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object
targetType System.Type
parameter object
culture System.Globalization.CultureInfo
Résultat object
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string result = "Black";
            decimal sourceValue = 0M;
            if (value != null && decimal.TryParse(value.ToString(), out sourceValue))
            {
                if (sourceValue >= 100)
                {
                    result = "Red";
                }
            }
            return result;
        }
ForegroundConverter