Table of Contents

Class DefaultValueConverter

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

Provides a default set of value conversions for bindings that do not specify a value converter.

public class DefaultValueConverter : IValueConverter
Inheritance
DefaultValueConverter
Implements
Inherited Members

Constructors

DefaultValueConverter()

public DefaultValueConverter()

Fields

Instance

Gets an instance of a DefaultValueConverter.

public static readonly DefaultValueConverter Instance

Field Value

DefaultValueConverter

Methods

Convert(object?, Type, object?, CultureInfo)

Converts a value.

public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)

Parameters

value object

The value 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.

ConvertBack(object?, Type, object?, CultureInfo)

Converts a value.

public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)

Parameters

value object

The value 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.