Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Maupin <ermaup@microsoft.com>2018-05-01 21:48:51 +0300
committerEric Maupin <ermaup@microsoft.com>2018-05-01 21:48:51 +0300
commit22d52b87dae67027b4fb0aecd688008812535c5b (patch)
tree2dbf8059bd4892b376c310e9a958866d15b9ecc1 /Xamarin.PropertyEditing
parent6f02e9bac95be36b7a22168cf275fa1205711e3d (diff)
[Core] Fix grouped properties not properly adding at the end
Diffstat (limited to 'Xamarin.PropertyEditing')
-rw-r--r--Xamarin.PropertyEditing/ViewModels/PanelViewModel.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing/ViewModels/PanelViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PanelViewModel.cs
index 3d70022..69d9390 100644
--- a/Xamarin.PropertyEditing/ViewModels/PanelViewModel.cs
+++ b/Xamarin.PropertyEditing/ViewModels/PanelViewModel.cs
@@ -135,20 +135,26 @@ namespace Xamarin.PropertyEditing.ViewModels
new PropertyGroupViewModel (TargetPlatform, kvp.Key, kvp.Value, ObjectEditors)
};
+ bool added = false;
for (; i < this.arranged.Count; i++) {
var g = (IGrouping<string, EditorViewModel>) this.arranged[i];
// TODO: Are we translating categories? If so this needs to lookup the resource and be culture specific
if (g.Key == null) { // nulls go on the bottom.
+ added = true;
AutoExpandGroup (group.Key);
this.arranged.Insert (i, group);
break;
} else if (String.Compare (g.Key, kvp.Key, StringComparison.Ordinal) > 0) {
+ added = true;
AutoExpandGroup (g.Key);
this.arranged.Insert (i++, group);
break;
}
}
+
+ if (!added)
+ this.arranged.Add (group);
}
}