18 lines
514 B
C#
18 lines
514 B
C#
using Avalonia.Data.Converters;
|
|
|
|
namespace Cowain.Base.Converters;
|
|
|
|
public static class StringVisibilityConverter
|
|
{
|
|
|
|
public static readonly IValueConverter IsNullOrEmpty =
|
|
new FuncValueConverter<string?, bool>(x => string.IsNullOrEmpty(x));
|
|
|
|
/// <summary>
|
|
/// A value converter that returns true if the input object is not null.
|
|
/// </summary>
|
|
public static readonly IValueConverter IsNotNullOrEmpty =
|
|
new FuncValueConverter<string?, bool>(x => !string.IsNullOrEmpty(x));
|
|
|
|
}
|