OpenDatabase control now handles status changes with VisualStateManager instead of Vm

Opening DB shows a progress ring instead
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-30 11:10:10 +02:00
parent 9fdc727787
commit d2814c6c67
10 changed files with 72 additions and 90 deletions

View File

@@ -1,27 +0,0 @@
using System;
using Windows.UI;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;
namespace ModernKeePass.Converters
{
public class DiscreteIntToSolidColorBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
var status = System.Convert.ToInt32(value);
switch (status)
{
case 1: return new SolidColorBrush(Colors.Red);
case 3: return new SolidColorBrush(Colors.Yellow);
case 5: return new SolidColorBrush(Colors.Green);
default: return new SolidColorBrush(Colors.Black);
}
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}