Inheritance: IFileInformationFactory
コード例 #1
0
ファイル: PictureTest.xaml.cs プロジェクト: zirakai/NyxoWp
        private void fileInitialisation()
        {
            var pictureQueryOptions = new QueryOptions();
            // Don't read through all the subfolders.
            pictureQueryOptions.FolderDepth = FolderDepth.Shallow;

            // Apply the query on the PicturesLibrary
            var pictureQuery = KnownFolders.PicturesLibrary.CreateFileQueryWithOptions(pictureQueryOptions);
            // Get picture information
            var picturesInformation = new FileInformationFactory(pictureQuery, ThumbnailMode.PicturesView);
            picturesSource.Source = picturesInformation.GetVirtualizedFilesVector();
        }
コード例 #2
0
        public async void Activate(FileOpenPickerActivatedEventArgs args)
        {
            _fileOpenPickerUI = args.FileOpenPickerUI;
            _fileOpenPickerUI.FileRemoved += this.FilePickerUI_FileRemoved;
            _fileOpenPickerUI.Title = "Select files from the video library";

            QueryOptions qo = new QueryOptions();
            var qr = KnownFolders.VideosLibrary.CreateFileQuery();
            FileInformationFactory fif = new FileInformationFactory(qr, ThumbnailMode.VideosView);

            lstView.ItemsSource = (await fif.GetFilesAsync());

            Window.Current.Content = this;
            Window.Current.Activate();
        }
コード例 #3
0
ファイル: PictureFilesView.xaml.cs プロジェクト: ckc/WinApp
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var queryOptions = new QueryOptions();
            queryOptions.FolderDepth = FolderDepth.Deep;
            queryOptions.IndexerOption = IndexerOption.UseIndexerWhenAvailable;
            queryOptions.SortOrder.Clear();
            var sortEntry = new SortEntry();
            sortEntry.PropertyName = "System.FileName";
            sortEntry.AscendingOrder = true;
            queryOptions.SortOrder.Add(sortEntry);

            var fileQuery = KnownFolders.PicturesLibrary.CreateFileQueryWithOptions(queryOptions);
            const uint size = 190; // default size for PicturesView mode
            var fileInformationFactory = new FileInformationFactory(fileQuery, ThumbnailMode.PicturesView, size, ThumbnailOptions.UseCurrentScale, true);
            itemsViewSource.Source = fileInformationFactory.GetVirtualizedFilesVector();
        }