diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:35:25 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:35:25 +0000 |
| commit | 674ca83ba9243a9e95a7568c797668dab6aee26a (patch) | |
| tree | 4a905b3fb1d827665a34d63f67bc5559f8e7235b /Gestor.Common/Gestor.Common.Converters/ComparativoPercentualToolTipConverter.cs | |
| download | gestor-674ca83ba9243a9e95a7568c797668dab6aee26a.tar.gz gestor-674ca83ba9243a9e95a7568c797668dab6aee26a.zip | |
feat: upload files
Diffstat (limited to 'Gestor.Common/Gestor.Common.Converters/ComparativoPercentualToolTipConverter.cs')
| -rw-r--r-- | Gestor.Common/Gestor.Common.Converters/ComparativoPercentualToolTipConverter.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Gestor.Common/Gestor.Common.Converters/ComparativoPercentualToolTipConverter.cs b/Gestor.Common/Gestor.Common.Converters/ComparativoPercentualToolTipConverter.cs new file mode 100644 index 0000000..a978ec0 --- /dev/null +++ b/Gestor.Common/Gestor.Common.Converters/ComparativoPercentualToolTipConverter.cs @@ -0,0 +1,33 @@ +using System;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace Gestor.Common.Converters
+{
+ public class ComparativoPercentualToolTipConverter : IMultiValueConverter
+ {
+ public ComparativoPercentualToolTipConverter()
+ {
+ }
+
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+ {
+ object obj;
+ try
+ {
+ decimal num = (decimal)values[1] * new decimal(100);
+ obj = string.Format("VALOR EM {0}: {1}%", values[0], num);
+ }
+ catch (Exception exception)
+ {
+ obj = "";
+ }
+ return obj;
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+ }
+}
\ No newline at end of file |