Skip to main content

Convert Method

Converts a value.

Definition

Namespace: Avalonia.Controls.Converters
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

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

Parameters

  Object
The value to convert.
  Type
The type of the target.
  Object
A user-defined parameter.
  CultureInfo
The culture to use.

Return Value

Object
The converted value.

Implements

IValueConverter.Convert(Object, Type, Object, CultureInfo)

Remarks

This method should not throw exceptions. If the value is not convertible, return a BindingNotification in an error state. Any exceptions thrown will be treated as an application exception.

See Also

Reference

EnumToBoolConverter Class
Avalonia.Controls.Converters Namespace