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
Methods
Convert(object?, Type, object?, CultureInfo)
Converts a value.
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
Parameters
value
objectThe value to convert.
targetType
TypeThe type of the target.
parameter
objectA user-defined parameter.
culture
CultureInfoThe 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
objectThe value to convert.
targetType
TypeThe type of the target.
parameter
objectA user-defined parameter.
culture
CultureInfoThe culture to use.
Returns
- object
The converted value.