Posted 16 years ago
by Philipp Schmid
Version: 4.5.0485
Platform: .NET 3.5
Environment: Windows Vista (32-bit)
I am trying to bind the IsReadOnly property of a PropertyGridPropertyItem like this:
The converter simply returns the NOT of the IsFinal boolean value:
However, while this converter is called correctly when needed, the returned value seems to be ignored (IsReadOnly is always false).
Is this a known issue?
Philipp
<propgrid:PropertyGridPropertyItem ValueName="Quantity"
Value="{Binding Path=Quantity, UpdateSourceTrigger=PropertyChanged}" ValueType="{x:Type system:Single}"
IsReadOnly="{Binding Path=IsFinal, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource IsFinalToReadOnlyConverter}}"
Description="The desired quantity of this product." Category="General" />
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return !((bool)value);
}
Is this a known issue?
Philipp