Skip to content

RuntimeBindingConverter.TryConvert(TFrom, object?, IBindingTypeConverter?, TTo) method

Defined in

Type: RuntimeBindingConverter Namespace: ReactiveUI.Binding.Fallback Assembly: ReactiveUI.Binding.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

public static bool TryConvert<TFrom, TTo>(TFrom value, object? conversionHint, IBindingTypeConverter? converterOverride, out TTo result)

View source

Summary: Attempts to convert value from TFrom to TTo for a generated BindTo assignment.

Type parameters

NameDescription
TFromThe declared source value type.
TToThe target property type.

Parameters

NameTypeDescription
valueTFromThe value produced by the source observable.
conversionHintobject?An optional conversion hint forwarded to the converter.
converterOverride[IBindingTypeConverter?](#An optional explicit converter that takes precedence over the registry.
out resultTToThe converted value when conversion succeeds.

Returns: bool -- true if conversion succeeded; otherwise false.