Files
WCS/Cowain.Base/Converters/StringVisibilityConverter.cs
2026-03-02 09:08:20 +08:00

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));
}