Skip to main content

DefaultValueConverter Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

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

public class DefaultValueConverter

Inheritance: object -> DefaultValueConverter

Implements:IValueConverter

Constructors

NameDescription
DefaultValueConverterNo summary available.

DefaultValueConverter Constructor

public DefaultValueConverter()

Methods

NameDescription
ConvertConverts a value.
ConvertBackConverts a value.

Convert Method

Converts a value.

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

Parameters

value object

The value to convert.

targetType Type

The type of the target.

parameter object

A user-defined parameter.

culture System.Globalization.CultureInfo

The culture to use.

Returns

object

The converted value.

ConvertBack Method

Converts a value.

public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

Parameters

value object

The value to convert.

targetType Type

The type of the target.

parameter object

A user-defined parameter.

culture System.Globalization.CultureInfo

The culture to use.

Returns

object

The converted value.

Fields

NameDescription
InstanceGets an instance of a Avalonia.Data.Converters.DefaultValueConverter.

Instance Field

Gets an instance of a Avalonia.Data.Converters.DefaultValueConverter.

public Avalonia.Data.Converters.DefaultValueConverter Instance