private DirectoryService()
        {
            _groupedFilesAndFolders = new ObservableGroupingCollection <string, FileOrFolder>(FilesAndFolders);
            _groupedFolders         = new ObservableGroupingCollection <string, FileOrFolder>(Folders);

            // Arrange for the first time, so that the collections get filled.
            _groupedFilesAndFolders.ArrangeItems(new NameSorter(SortSequence.Asc), x => x.Name.First().ToString().ToUpper());
            _groupedFolders.ArrangeItems(new NameSorter(SortSequence.Asc), x => x.Name.First().ToString().ToUpper());
        }
Beispiel #2
0
 private DirectoryService()
 {
     _groupedFilesAndFolders = new ObservableGroupingCollection <string, FileOrFolder>(FilesAndFolders);
     GroupByNameAscending();
 }
 public UwpViewModel()
 {
     _groupingCollection = new ObservableGroupingCollection <string, Contact>(new Cache().Contacts);
     _groupingCollection.ArrangeItems(new StateSorter(), (x => x.State));
     NotifyPropertyChanged("GroupedContacts");
 }