summaryrefslogtreecommitdiff
path: root/Gestor.Common/Gestor.Common.Converters/PagamentoVendedorCorretoraVisibilityConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Common/Gestor.Common.Converters/PagamentoVendedorCorretoraVisibilityConverter.cs')
-rw-r--r--Gestor.Common/Gestor.Common.Converters/PagamentoVendedorCorretoraVisibilityConverter.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Gestor.Common/Gestor.Common.Converters/PagamentoVendedorCorretoraVisibilityConverter.cs b/Gestor.Common/Gestor.Common.Converters/PagamentoVendedorCorretoraVisibilityConverter.cs
new file mode 100644
index 0000000..8eb4a0d
--- /dev/null
+++ b/Gestor.Common/Gestor.Common.Converters/PagamentoVendedorCorretoraVisibilityConverter.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Gestor.Common.Converters;
+
+public class PagamentoVendedorCorretoraVisibilityConverter : IMultiValueConverter
+{
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (values[1] is bool && values[0] == null && (bool)values[1])
+ {
+ return (object)(Visibility)2;
+ }
+ return (object)(Visibility)0;
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+}