IValueConverter.ConvertBack method

Applies to Windows and Windows Phone

Modifies the target data before passing it to the source object. This method is called only in TwoWay bindings.

Syntax


object ConvertBack(
  object value, 
  Type targetType, 
  object parameter, 
  string language
)

Parameters

value

Type: System.Object [.NET] | Platform::Object [C++]

The target data being passed to the source.

targetType

Type: System.Type [.NET] | TypeName [C++]

The type of the target property, as a type reference (System.Type for .NET, a TypeName helper struct for C++/CX).

parameter

Type: System.Object [.NET] | Platform::Object [C++]

An optional parameter to be used in the converter logic.

language

Type: System.String [.NET] | Platform::String [C++]

The language of the conversion.

Return value

Type: System.Object [.NET] | Platform::Object [C++]

The value to be passed to the source object.

Remarks

If you don't use a converter for TwoWay bindings it's acceptable to leave ConvertBack unimplemented (uses the template default from Visual Studio where it returns a NotImplementedException).

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Data
Windows::UI::Xaml::Data [C++]

Metadata

Windows.winmd

See also

IValueConverter
Convert
XAML data binding sample
Data binding overview

 

 

Show:
© 2014 Microsoft