Table of Contents

Class StringFormatMultiValueConverter

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

A multi-value converter which calls Format(string, object)

public class StringFormatMultiValueConverter : IMultiValueConverter
Inheritance
StringFormatMultiValueConverter
Implements
Inherited Members

Constructors

StringFormatMultiValueConverter(string, IMultiValueConverter?)

Initializes a new instance of the StringFormatMultiValueConverter class.

public StringFormatMultiValueConverter(string format, IMultiValueConverter? inner)

Parameters

format string

The format string.

inner IMultiValueConverter

An optional inner converter to be called before the format takes place.

Properties

Format

Gets the format string.

public string Format { get; }

Property Value

string

Inner

Gets an inner value converter which will be called before the string format takes place.

public IMultiValueConverter? Inner { get; }

Property Value

IMultiValueConverter

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.