diff --git a/KeyManager.Library.KeyStore.SAM_SE.UI/Domain/SAM_SEConverters.cs b/KeyManager.Library.KeyStore.SAM_SE.UI/Domain/SAM_SEConverters.cs deleted file mode 100644 index 639c8b6..0000000 --- a/KeyManager.Library.KeyStore.SAM_SE.UI/Domain/SAM_SEConverters.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* -** File Name: SAM_SEConverters.cs -** Author: s_eva -** Creation date: January 2024 -** Description: This file regroups all the converters for XAML Files. -** Licence: LGPLv3 -** Copyright (c) 2023-Present Synchronic -*/ - -using System.Globalization; -using System.Windows.Data; -using System.Windows; - -namespace Leosac.KeyManager.Library.KeyStore.SAM_SE.UI.Domain -{ - public class BooleanToVisibilityConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - bool boolValue = (bool)value; - boolValue = (parameter != null) ? !boolValue : boolValue; - return boolValue ? Visibility.Visible : Visibility.Collapsed; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStorePropertiesControl.xaml b/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStorePropertiesControl.xaml index b2b29de..4af2086 100644 --- a/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStorePropertiesControl.xaml +++ b/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStorePropertiesControl.xaml @@ -13,11 +13,12 @@ d:DataContext="{d:DesignInstance domain:SAM_SEKeyStorePropertiesControlViewModel}" d:DesignHeight="300" d:DesignWidth="500"> - + + @@ -45,6 +46,6 @@ materialDesign:TextFieldAssist.HasClearButton="True" materialDesign:PasswordBoxAssist.Password="{Binding Properties.Secret, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}" - Visibility="{Binding SAM_SEProperties.DefaultKey, Converter={StaticResource VisibleIfTrueConverter}, ConverterParameter='negate'}" /> + Visibility="{Binding SAM_SEProperties.DefaultKey, Converter={StaticResource ReverseBooleanToVisibilityConverter}}" /> diff --git a/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStoreToolsControl.xaml b/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStoreToolsControl.xaml index c007b64..40379e9 100644 --- a/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStoreToolsControl.xaml +++ b/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SEKeyStoreToolsControl.xaml @@ -13,7 +13,7 @@ d:DataContext="{d:DesignInstance domain:SAM_SEKeyStoreToolsControlViewModel}" d:DesignHeight="450" d:DesignWidth="800"> - + diff --git a/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SESymmetricKeyEntryPropertiesControl.xaml b/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SESymmetricKeyEntryPropertiesControl.xaml index 4452a66..18f774d 100644 --- a/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SESymmetricKeyEntryPropertiesControl.xaml +++ b/KeyManager.Library.KeyStore.SAM_SE.UI/SAM_SESymmetricKeyEntryPropertiesControl.xaml @@ -15,7 +15,7 @@ d:DataContext="{d:DesignInstance domain:SAM_SESymmetricKeyEntryPropertiesControlViewModel}" d:DesignHeight="800" d:DesignWidth="500"> - +