Sic08/SicUI/Models/RecipeEditors/Converters/IsDgSelectionCountEqualsOne...

26 lines
662 B
C#
Raw Normal View History

2023-03-03 15:42:13 +08:00
using System;
using System.Collections;
using System.Globalization;
using System.Windows.Data;
namespace SicUI.Models.RecipeEditors
{
internal class IsDgSelectionCountEqualsOneConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is IList selection)
{
return selection.Count == 1;
}
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}