Hi, this is an feature asked on the PropertyGrid : https://wpftoolkit.codeplex.com/workitem/18507
Please vote for it.
In the meantime, there could be a workaround. When a value of a propertyItem changes in the PropertyGrid, you could change the IsEnabled property of another PropertyItem. Here's how with the PropertyValueChanged callback from the PropertyGrid.
Please vote for it.
In the meantime, there could be a workaround. When a value of a propertyItem changes in the PropertyGrid, you could change the IsEnabled property of another PropertyItem. Here's how with the PropertyValueChanged callback from the PropertyGrid.
private void PropertyGrid_PropertyValueChanged( object sender, Xceed.Wpf.Toolkit.PropertyGrid.PropertyValueChangedEventArgs e )
{
PropertyItem item = e.OriginalSource as PropertyItem;
if( (item != null) && (item.DisplayName == "HasText" ) )
{
List<PropertyItem> propertyList = PropertyGrid.Properties.Cast<PropertyItem>().ToList();
if( propertyList != null )
{
int index = propertyList.FindIndex( x => x.DisplayName == "Text" );
if( index >= 0 )
{
( ( PropertyItem )PropertyGrid.Properties[ index ] ).IsEnabled = ( bool )e.NewValue;
}
}
}
}