Sic.Framework-Nanjing-Baishi/MECF.Framework.UI.Client/RecipeEditorLib/Converters/RecipeErrorsCountToBadgeCon...

26 lines
661 B
C#
Raw Normal View History

2023-04-13 11:51:03 +08:00
using System;
using System.Globalization;
using System.Windows.Data;
namespace MECF.Framework.UI.Client.RecipeEditorLib.Converters
2023-04-13 11:51:03 +08:00
{
public class RecipeErrorsCountToBadgeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is int cnt))
return null;
if (cnt == 0)
return null;
return cnt;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}