In This Article

ColorPickerHexTextConverter Class

A value converter that can format the hex text for a ColorPicker.

public class ColorPickerHexTextConverter : IMultiValueConverter
Inheritance:
object object
Implements:
IMultiValueConverter

Remarks

Four values (Color color, AlphaComponentPosition alphaPosition, bool isAlphaEnabled, bool isAlphaVisible) must be used with this converter.

Constructors

ColorPickerHexTextConverter()

Initializes an instance of the class.

public ColorPickerHexTextConverter()

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)
Parameter Type Description
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 Avalonia.AvaloniaProperty.UnsetValue. Any exception thrown will be treated as an application exception.

Inherited Members

Extension Methods