using System; using System.Globalization; using System.Windows; using System.Windows.Data; namespace HC_APTBS.Converters { /// /// Returns when the value is non-null, /// and when the value is null. /// public sealed class NullToVisibilityConverter : IValueConverter { public object Convert(object? value, Type targetType, object parameter, CultureInfo culture) => value is null ? Visibility.Collapsed : Visibility.Visible; public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotSupportedException(); } }