From 107287c251be8a9109dab97c5af9006546234f5b Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Mon, 24 Oct 2011 22:26:24 +0000 Subject: [PATCH] PropertyGrid: fixed issue wtih ExpandableObject not expanding when private setter is present. --- .../PropertyGrid/Implementation/PropertyItem.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs index 1d814a2c..216188c0 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs @@ -333,13 +333,10 @@ namespace Microsoft.Windows.Controls.PropertyGrid Instance = instance; BindingPath = bindingPath; - if (!IsReadOnly) + var attribute = PropertyGridUtilities.GetAttribute(PropertyDescriptor); + if (attribute != null && PropertyDescriptor.GetValue(Instance) != null) { - var attribute = PropertyGridUtilities.GetAttribute(PropertyDescriptor); - if (attribute != null && PropertyDescriptor.GetValue(Instance) != null) - { - HasChildProperties = true; - } + HasChildProperties = true; } CommandBindings.Add(new CommandBinding(PropertyItemCommands.ResetValue, ExecuteResetValueCommand, CanExecuteResetValueCommand));