Binding::Converter Property
Gets or sets the converter to use.
Assembly: PresentationFramework (in PresentationFramework.dll)
public: property IValueConverter^ Converter { IValueConverter^ get(); void set(IValueConverter^ value); }
Property Value
Type: System.Windows.Data::IValueConverter^A value of type IValueConverter. The default is null.
A binding implicitly uses a default converter that tries to do a type conversion between the source value and the target value. If a conversion cannot be made, the default converter returns null.
If you want to associate a custom value converter with a binding, you should create a class that implements the IValueConverter interface and supply implementations for the Convert and ConvertBack methods. Value converters can change data from one type to another, translate between cultural details such as character sets, or modify other aspects of their presentation. For examples of typical conversion scenarios, see "Data Conversion" in the Data Binding Overview.
<object Converter="myConverter"/>
- myConverter
A resource reference to a class that implements the IValueConverter interface, which includes implementations of the Convert and ConvertBack methods. To refer to a value converter, use the StaticResource Markup Extension.
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0