Table of Contents

Method ConvertBack

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

ConvertBack(object, Type, object, CultureInfo)

Convert back a value. Called when moving a value from target to source. This should implement the inverse of Convert.

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

Parameters

value object

value, as produced by target

targetType Type

target type

parameter object

converter parameter

culture CultureInfo

culture information

Returns

object

Converted back value.

Binding.DoNothing may be returned to indicate that no value should be set on the source property.

System.Windows.DependencyProperty.UnsetValue may be returned to indicate that the converter is unable to provide a value for the source property, and no value will be set to it.

Remarks

The data binding engine does not catch exceptions thrown by a user-supplied converter. Thus any exception thrown by ConvertBack, or thrown by methods it calls and not caught by the ConvertBack, will be treated as a runtime error (i.e. a crash). ConvertBack should handle anticipated problems by returning DependencyProperty.UnsetValue.