using System; using System.Globalization; using System.Windows.Data; using System.Windows.Markup; using System.Windows.Media; namespace Gestor.Common.Converters; public class NegativoColorConverter : MarkupExtension, IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown if (value != null && !string.IsNullOrEmpty(value.ToString())) { if (value.ToString().Contains("-")) { return (object)new SolidColorBrush(Colors.Red); } return (object)new SolidColorBrush(Colors.Black); } return (object)new SolidColorBrush(Colors.Black); } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return null; } public override object ProvideValue(IServiceProvider serviceProvider) { return this; } }