Ejemplo n.º 1
0
 private void ApplySort(string columnPropertyName, string ColumnName, string SortDirection)         // Usage: AppySort("ColumnHeaderProperty", "Column Header Text", "Descending");
 {
     if (SortDirection == "Ascending")
     {
         GridViewSort.ApplySort(DownloadList.Items, columnPropertyName, DownloadList, headers.Where(h => h.Content != null && h.Content.ToString() == ColumnName).FirstOrDefault());
     }
     else if (SortDirection == "Descending")
     {
         GridViewSort.ApplySort(DownloadList.Items, columnPropertyName, DownloadList, headers.Where(h => h.Content != null && h.Content.ToString() == ColumnName).FirstOrDefault());                 // first one sorts asc
         GridViewSort.ApplySort(DownloadList.Items, columnPropertyName, DownloadList, headers.Where(h => h.Content != null && h.Content.ToString() == ColumnName).FirstOrDefault());                 // second one sorts the first to desc
     }
 }
Ejemplo n.º 2
0
        public override bool BeforeShow()
        {
            ExportSinceDate = DateTimeProvider.Current;

            RebuildList(true);

            //Posorotwanie grida po tej kolumnie zapewnii, ¿e nowe wêz³y bêd¹ (przynajmniej na pocz¹tku)
            //dodawane na pocz¹tku grida.
            GridViewSort.ApplySort(CollectionViewSource.GetDefaultView(Expressions), "Expression");

            WindowService.HideProgress();
            WindowService.MakeWindowVisible(this);
            return(true);
        }
Ejemplo n.º 3
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     GridViewSort.ApplySort(PendingSetsListView.Items, "Shelveset.CreationDate", PendingSetsListView, (GridViewColumnHeader)GridViewColumnPendingSetsShelvesetCreationDate.Header, ListSortDirection.Descending);
 }
Ejemplo n.º 4
0
 private void ServersListViewOnLoaded(object sender, RoutedEventArgs e)
 {
     GridViewSort.ApplySort(ServersListView.Items, nameof(ServerModel.PlayerCount), ServersListView, PlayerCountColumnHeader);
 }
 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     GridViewSort.ApplySort(PendingChangesListView.Items, "Change.LocalOrServerFolder", PendingChangesListView, (GridViewColumnHeader)GridViewColumnPendingChangesLocalOrServerFolder.Header, ListSortDirection.Ascending);
 }