Index: src/DeltaShell/DeltaShell.Gui/PropertyGridView.cs =================================================================== diff -u -rc8c1296880fdc4d8dc67c652ae1dd22244d3c5d5 -r7770b50eb79dc966602df6bebadc2f93209415ce --- src/DeltaShell/DeltaShell.Gui/PropertyGridView.cs (.../PropertyGridView.cs) (revision c8c1296880fdc4d8dc67c652ae1dd22244d3c5d5) +++ src/DeltaShell/DeltaShell.Gui/PropertyGridView.cs (.../PropertyGridView.cs) (revision 7770b50eb79dc966602df6bebadc2f93209415ce) @@ -34,12 +34,28 @@ HideTabsButton(); this.gui = gui; + PropertySort = PropertySort.Categorized; gui.SelectionChanged += GuiSelectionChanged; } - public new object SelectedObject + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnPropertySortChanged(EventArgs e) { + // Needed for maintaining property order + if (PropertySort == PropertySort.CategorizedAlphabetical) + { + PropertySort = PropertySort.Categorized; + } + + base.OnPropertySortChanged(e); + } + + private new object SelectedObject + { get { return selectedObject; @@ -220,7 +236,7 @@ Log.DebugFormat(Resources.PropertyGrid_OnSelectedObjectsChanged_Selected_object_of_type___0_, selectedType.Name); base.SelectedObject = SelectedObject; - } + } private static Type GetRelevantType(object obj) {