using Microsoft.UI.Xaml.Data;

namespace NixExampleWinUI.Helpers;

public class StringNotEmptyToBooleanConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, string language)
    {
        if (value is string)
        {
            return ((string)value).Length > 0;
        }
        return false;
    }

    public object ConvertBack(object value, Type targetType, object parameter, string language)
    {
        throw new NotImplementedException();
    }
}