21 lines
641 B
C#
21 lines
641 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace HashCalculator.GUI.Converters
|
|
{
|
|
[ValueConversion(typeof(InputEntry), typeof(bool))]
|
|
internal class ValidInputEntryTypeToBooleanConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
var entry = value as InputEntry;
|
|
return entry?.IsValid == true;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |