MefContrib / MefContrib-Tools

User contributed tools for the Managed Extensibility Framework (MEF)
http://mefcontrib.com
Microsoft Public License
15 stars 5 forks source link

Left panel items are sorted in random order #1

Open zvaryuga opened 7 years ago

zvaryuga commented 7 years ago

Cannot seems to figure out how to set the sort order for the items in the left pane. Somehow, the items are sorted fine if there is just a handful of them, but that changes when I have 20 or so.

Sorting item in WPF designer turned out to be a non-trivial task. Please help.

hymccord commented 6 years ago

@zvaryuga

After https://github.com/MefContrib/MefContrib-Tools/blob/f819b4687f376847d4d756ea263afcbaaf2cf61f/src/MefContrib.Tools.Visualizer/Models/MainViewModel.cs#L33

Add this: this.PartDefinitions.SortDescriptions.Add(new SortDescription("DisplayName", ListSortDirection.Ascending));