19 lines
537 B
C#
19 lines
537 B
C#
|
using System;
|
||
|
using System.Globalization;
|
||
|
using Avalonia.Data.Converters;
|
||
|
|
||
|
namespace DispenserUI.ViewModels.Converter;
|
||
|
|
||
|
public class StringNullOrEmptyToVisibilityConverter : IValueConverter
|
||
|
{
|
||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||
|
{
|
||
|
var str = value as string;
|
||
|
return !string.IsNullOrEmpty(str);
|
||
|
}
|
||
|
|
||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||
|
{
|
||
|
throw new NotImplementedException();
|
||
|
}
|
||
|
}
|