Table of Contents

Class FuncMultiValueConverter<TIn, TOut>

Namespace
Avalonia.Data.Converters
Assembly
Avalonia.Base.dll

A general purpose IValueConverter that uses a Func<T, TResult> to provide the converter logic.

public class FuncMultiValueConverter<TIn, TOut> : IMultiValueConverter

Type Parameters

TIn

The type of the inputs.

TOut

The output type.

Inheritance
FuncMultiValueConverter<TIn, TOut>
Implements
Inherited Members

Constructors

FuncMultiValueConverter(Func<IEnumerable<TIn?>, TOut>)

Initializes a new instance of the FuncValueConverter<TIn, TOut> class.

public FuncMultiValueConverter(Func<IEnumerable<TIn?>, TOut> convert)

Parameters

convert Func<IEnumerable<TIn>, TOut>

The convert function.

Methods

Convert(IList<object?>, Type, object?, CultureInfo)

Converts multi-binding inputs to a final value.

public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)

Parameters

values IList<object>

The values to convert.

targetType Type

The type of the target.

parameter object

A user-defined parameter.

culture CultureInfo

The culture to use.

Returns

object

The converted value.

Remarks

This method should not throw exceptions. If the value is not convertible, return UnsetValue. Any exception thrown will be treated as an application exception.