Compartilhar via


Binding.ConverterParameter Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public Property ConverterParameter As Object
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 nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
InvalidOperationException

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

Remarks

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. For more information, see Binding Markup Extension.

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

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.