BooleanToVisibilityTypeConverter.GetAffinityForObjects() method¶
Defined in
Type: BooleanToVisibilityTypeConverter
Namespace: ReactiveUI.Reactive.Maui
Assembly: ReactiveUI.Maui.Reactive.dll
Applies to
net10.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-windows10.0.19041, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-maccatalyst26.0, net10.0-tvos26.0, net9.0-desktop1.0, net9.0-windows10.0.19041
public override int GetAffinityForObjects()
Inherited documentation
These docs were inherited from BindingTypeConverter<bool, Visibility>. The member doesn't override them on this type.
Summary: Returns the affinity score for this converter.
Returns: int -- A positive integer indicating converter priority. Higher values win when multiple converters match. Return 0 if the converter cannot handle the type pair.
Remarks
Affinity Guidelines:
- 0 - Cannot convert (no conversion possible)
- 1 - Last resort converters (e.g., EqualityTypeConverter)
- 2 - Standard ReactiveUI core converters (string, numeric, datetime)
- 8 - Platform-specific standard converters (NSDate, WinForms controls)
- 100+ - Third-party override range (use to override ReactiveUI defaults)
When multiple converters match the same type pair, the converter with the highest affinity is selected. Third-party converters should return 100 or higher to override ReactiveUI defaults.