Sort a Bound DropDown In WPF
This came up a while back and had me a bit flustered for a bit. You’re getting some data that you don’t have a ton of control over that you’re binding right into a ddl in WPF and you want to sort it because well, sorting is important.
It isn’t too late! You can do the following in your constructor and it’ll look fine.
ddlAssignTo.Items.SortDescriptions.Add(new SortDescription(“Username”, ListSortDirection.Ascending));