As a result of this discussion (see https://wpftoolkit.codeplex.com/discussions/639720), I did some debugging and I found the bug:
The DescriptorPropertyDefinition class which creates the binding to the value, does ignore the culture settings. Therefore the implicit converters which are used when a DataTemplate is set, it uses the default culture setting.
This is how I fixed it:
```
protected override BindingBase CreateValueBinding()
{
//Bind the value property with the source object.
var binding = new Binding( PropertyDescriptor.Name )
{
Source = SelectedObject,
Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay,
ValidatesOnDataErrors = true,
ValidatesOnExceptions = true,
//when I set the converterCulture like this, its working.
ConverterCulture = System.Globalization.CultureInfo.CurrentCulture
};
return binding;
}
```
Maybe it's worth including it in the next release?
regards
Andreas
The DescriptorPropertyDefinition class which creates the binding to the value, does ignore the culture settings. Therefore the implicit converters which are used when a DataTemplate is set, it uses the default culture setting.
This is how I fixed it:
```
protected override BindingBase CreateValueBinding()
{
//Bind the value property with the source object.
var binding = new Binding( PropertyDescriptor.Name )
{
Source = SelectedObject,
Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay,
ValidatesOnDataErrors = true,
ValidatesOnExceptions = true,
//when I set the converterCulture like this, its working.
ConverterCulture = System.Globalization.CultureInfo.CurrentCulture
};
return binding;
}
```
Maybe it's worth including it in the next release?
regards
Andreas