0
Reply

Binding and Converter via IValueConverter

guenter Alzinger

guenter Alzinger

Mar 2 2016 6:45 AM
338
In a binding you can use the property Converter to provide a specific converter class, inherited from IValueConverter, to it.
 
 My question is know, if it is somehow possible to create a user control like
public class MyTextBox : TextBox, IValueConverter
and assign this, i.e. the textbox itself, to the Converter property in the Binding expression.
Example:
<MyTextBox... Text="{Binding Path=Price, Mode=TwoWay, Converter={RelativeSource Self}}"... />
 
Thx a lot for your support.