37 lines
807 B
C#
37 lines
807 B
C#
using BS.Shared;
|
|
using BS.Shared.Core;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Data;
|
|
using System.Windows.Media;
|
|
|
|
namespace BeWo.Converter
|
|
{
|
|
public class ValidationToTooltipConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is null)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
if (value is bool val_bool && parameter is ValidationType val_type)
|
|
{
|
|
return val_bool ? null : GkvValidator.InvalidTooltipTxt(val_type);
|
|
}
|
|
|
|
return "xxx";
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|