2using System.Globalization;
3using Microsoft.Maui.Controls;
18 public object Convert(
object? value, Type targetType,
object? parameter, CultureInfo culture)
20 bool Result = value is not
null;
21 return this.Invert ? !Result : Result;
25 public object ConvertBack(
object? value, Type targetType,
object? parameter, CultureInfo culture)
27 throw new NotSupportedException(
"NullToBooleanConverter does not support ConvertBack.");
Converts null references into boolean values, with optional inversion.
object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
bool Invert
Gets or sets a value indicating whether the converter should invert the result.