Skip to content

BooleanToVisibilityTypeConverter class

Defined in

Namespace: ReactiveUI Assembly: ReactiveUI.WinUI.dll Full name: ReactiveUI.BooleanToVisibilityTypeConverter Modifiers: public sealed

Summary

View source

Converts Boolean to Visibility.

Applies to

net10.0-windows10.0.19041

Class hierarchy
classDiagram
class BooleanToVisibilityTypeConverter
class BindingTypeConverter~bool, Visibility~
BindingTypeConverter~bool, Visibility~ <|-- BooleanToVisibilityTypeConverter

Inherits from: BindingTypeConverter<bool, Visibility>

Remarks

The conversion supports a BooleanToVisibilityHint as the conversion hint parameter:

  • None - True maps to Visible, False maps to Collapsed.
  • Inverse - Inverts the boolean before conversion (True → Collapsed, False → Visible).
  • UseHidden - Use Hidden instead of Collapsed for false values (MAUI only, ignored on WinUI).

Hints can be combined using bitwise OR (e.g., BooleanToVisibilityHint.Inverse | BooleanToVisibilityHint.UseHidden).

Constructors

NameSummary
.ctor

Methods

NameSummary
GetAffinityForObjectsReturns this converter's priority among the converters registered for the same type pair.
TryConvertConverts a value to the target type without boxing.
Inherited members