blob: 4949f858753741548cacfda1764afb52cc53fcbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
using System;
using System.Globalization;
using System.Windows.Data;
namespace Gestor.Common.Converters;
public class ComparativoPercentualToolTipConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
try
{
decimal num = (decimal)values[1] * 100m;
return $"VALOR EM {values[0]}: {num}%";
}
catch (Exception)
{
return "";
}
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
return null;
}
}
|