Binding.ConverterParameter Property

May 11, 2014

Gets or sets a parameter that can be used in the Converter logic.

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Object ConverterParameter { get; set; }
<Binding ConverterParameter="parameter"/>
-or-
<Binding ConverterParameter="parameterReference"/>

XAML Values

parameter

A parameter value that is either a primitive value, or can be type converted from a string.

parameterReference

A parameter value that is obtained as a reference to an already existing object. Typically the object is created in a ResourceDictionary and given a key, then referenced by using the StaticResource markup extension.

Property Value

Type: System.Object
A parameter to be passed to the Converter. This can be used in the conversion logic. The default is null.

ExceptionCondition
InvalidOperationException

The Binding has already been attached to a target element, and cannot be modified.

XAML Usage Notes

ConverterParameter can be set as a binding property through the Binding markup extension, which enables specifying an entire Binding as an attribute string.

Property element syntax to create an object element that fills a Binding.ConverterParameter property element is possible, but uncommon.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft