private static void SortBy(TreeViewItem parent, SearchQuerySortOrder order) { switch (order) { case SearchQuerySortOrder.AToZ: parent.children.Sort(SortAlpha); break; case SearchQuerySortOrder.ZToA: parent.children.Sort(SortAlphaDesc); break; case SearchQuerySortOrder.CreationTime: parent.children.Sort(SortCreationTime); break; case SearchQuerySortOrder.MostRecentlyUsed: parent.children.Sort(SortLastUsedTime); break; case SearchQuerySortOrder.ItemCount: parent.children.Sort(SortItemCount); break; } }
public void SortBy(SearchQuerySortOrder order) { m_SortOrder = order; SortBy(m_UserQueries, order); SortBy(m_ProjectQueries, order); BuildRows(rootItem); }