Windows.Storage.Search.QueryOptions.SetThumbnailPrefetch C# (CSharp) Method

SetThumbnailPrefetch() public method

public SetThumbnailPrefetch ( [ mode, [ requestedSize, [ options ) : void
mode [
requestedSize [
options [
return void
		public extern void SetThumbnailPrefetch([In] ThumbnailMode mode, [In] uint requestedSize, [In] ThumbnailOptions options);
		public extern void SetPropertyPrefetch([In] PropertyPrefetchOptions options, [In] IIterable<string> propertiesToRetrieve);

Usage Example

Ejemplo n.º 1
0
        //public ObservableCollection<ImageItem> Source = new ObservableCollection<ImageItem>();

        public async Task Init()
        {
            var queryOptions = new QueryOptions(CommonFileQuery.OrderByDate,
                new string[] { ".jpg", ".png", ".jpeg", ".bmp" })
            {
                FolderDepth = FolderDepth.Deep,
                IndexerOption = IndexerOption.OnlyUseIndexer,
                UserSearchFilter = "System.Kind:=System.Kind#Picture"
            };
            queryOptions.SetThumbnailPrefetch(ThumbnailMode.SingleItem, 256, ThumbnailOptions.UseCurrentScale);
            var _fileQueryResult = KnownFolders.PicturesLibrary.CreateFileQueryWithOptions(queryOptions);
            var files = await _fileQueryResult.GetFilesAsync();
            Debug.WriteLine("Count " + files.Count);
            var list = new List<ImageItem>();
            foreach (var f in files)
            {
                list.Add(new ImageItem()
                {
                    LocalPath = f.Path
                });
            }

            Source = new RangeCollection(list);
            Source.Init();
        }
All Usage Examples Of Windows.Storage.Search.QueryOptions::SetThumbnailPrefetch