Browse Source

PropertyGrid: Fixed column resizing when switching from Categorized to Alphabetized

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
11e66be6d9
  1. 13
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

13
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

@ -53,6 +53,7 @@ namespace Microsoft.Windows.Controls.PropertyGrid
protected virtual void OnIsCategorizedChanged(bool oldValue, bool newValue)
{
LoadProperties(newValue);
SetDragThumbMargin();
}
#endregion //IsCategorized
@ -104,6 +105,7 @@ namespace Microsoft.Windows.Controls.PropertyGrid
_propertyItemsCache = GetObjectProperties(newValue);
LoadProperties(IsCategorized);
SetDragThumbMargin();
}
#endregion //SelectedObject
@ -365,6 +367,17 @@ namespace Microsoft.Windows.Controls.PropertyGrid
}
}
private void SetDragThumbMargin()
{
if (_dragThumb == null)
return;
if (IsCategorized)
_dragThumb.Margin = new Thickness(6, 0, 0, 0);
else
_dragThumb.Margin = new Thickness(-1, 0, 0, 0);
}
#endregion //Methods
}
}

Loading…
Cancel
Save