Groups left collapsed menu now has a tooltip

Groups design changes: border now only around icon
Entry password reveal checkbox now works with XAML and converters
This commit is contained in:
2017-10-06 17:57:36 +02:00
committed by BONNEVILLE Geoffroy
parent f22ca4c46f
commit 3d033417ad
10 changed files with 83 additions and 51 deletions

View File

@@ -0,0 +1,28 @@
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
namespace ModernKeePass.Converters
{
public class InverseBooleanToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
var boolean = value is bool ? (bool)value : false;
return boolean ? Visibility.Collapsed : Visibility.Visible;
}
// No need to implement this
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
var visibility = value is Visibility ? (Visibility)value : Visibility.Visible;
switch (visibility)
{
case Visibility.Visible: return false;
case Visibility.Collapsed: return true;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}