IValueConverter.ConvertBack Method

Converts a value.

Namespace:  System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

'Declaration
Function ConvertBack ( _
	value As Object, _
	targetType As Type, _
	parameter As Object, _
	culture As CultureInfo _
) As Object

Parameters

value
Type: System.Object

The value that is produced by the binding target.

targetType
Type: System.Type

The type to convert to.

parameter
Type: System.Object

The converter parameter to use.

culture
Type: System.Globalization.CultureInfo

The culture to use in the converter.

Return Value

Type: System.Object
A converted value. If the method returns Nothing, the valid null value is used.

The data binding engine calls this method when it propagates a value from the binding target to the binding source.

The implementation of this method must be the inverse of the Convert method.

The data binding engine does not catch exceptions that are thrown by a user-supplied converter. Any exception that is thrown by the ConvertBack method, or any uncaught exceptions that are thrown by methods that the ConvertBack method calls, are treated as run-time errors. Handle anticipated problems by returning DependencyProperty.UnsetValue.

A return value of DependencyProperty.UnsetValue indicates that the converter produced no value and that the binding uses the FallbackValue, if available, or the default value instead.

A return value of Binding.DoNothing indicates that the binding does not transfer the value or use the FallbackValue or default value.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft