mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00

Button text is now settable Opening database is placed in async task dispatcher to return control to the UI
21 lines
631 B
C#
21 lines
631 B
C#
using System;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Data;
|
|
|
|
namespace ModernKeePass.Converters
|
|
{
|
|
class EmptyStringToVisibilityConverter: IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
var text = value is string ? value.ToString() : string.Empty;
|
|
return string.IsNullOrEmpty(text) ? Visibility.Collapsed : Visibility.Visible;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|