Skip to content

VisibilityToBooleanTypeConverter.TryConvert(Visibility, object?, bool) method

Defined in

Type: VisibilityToBooleanTypeConverter Namespace: ReactiveUI Assembly: ReactiveUI.WinUI.dll

Applies to

net11.0-windows10.0.19041

public override bool TryConvert(Visibility from, object? conversionHint, out bool result)

View source (opens in a new tab)

Inherited documentation

These docs were inherited from BindingTypeConverter<Visibility, bool>. The member doesn't override them on this type.

Summary: Converts a value to the target type without boxing.

Parameters

NameTypeDescription
fromVisibility (opens in a new tab)The value to convert.
conversionHintobject? (opens in a new tab)Implementation-defined hint for conversion (e.g., format string, locale).
out resultbool (opens in a new tab)The converted value. May be null when conversion succeeds for nullable targets.

Returns: bool (opens in a new tab) -- true if conversion succeeded; otherwise, false.

Remarks

This method is AOT-safe as all types are known at compile time. No reflection or boxing is required for value types.

When this method returns true, the result parameter may still be null for converters that map null inputs or empty values to nullable targets.