Browse Source

PropertyGrid: fixed issue wtih ExpandableObject not expanding when private setter is present.

import/raw
brianlagunas_cp 15 years ago
parent
commit
ecb7a81098
  1. 9
      Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs

9
Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs

@ -333,13 +333,10 @@ namespace Microsoft.Windows.Controls.PropertyGrid
Instance = instance; Instance = instance;
BindingPath = bindingPath; BindingPath = bindingPath;
if (!IsReadOnly) var attribute = PropertyGridUtilities.GetAttribute<ExpandableObjectAttribute>(PropertyDescriptor);
if (attribute != null && PropertyDescriptor.GetValue(Instance) != null)
{ {
var attribute = PropertyGridUtilities.GetAttribute<ExpandableObjectAttribute>(PropertyDescriptor); HasChildProperties = true;
if (attribute != null && PropertyDescriptor.GetValue(Instance) != null)
{
HasChildProperties = true;
}
} }
CommandBindings.Add(new CommandBinding(PropertyItemCommands.ResetValue, ExecuteResetValueCommand, CanExecuteResetValueCommand)); CommandBindings.Add(new CommandBinding(PropertyItemCommands.ResetValue, ExecuteResetValueCommand, CanExecuteResetValueCommand));

Loading…
Cancel
Save