FileInformationFactory.FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions, Boolean) constructor

Applies to Windows only

Creates a new FileInformationFactory object that retrieves information about the StorageFile and StorageFolder objects in the specified query result, specifies the requested size and options for thumbnails that are retrieved for the objects, and indicates whether to delay loading information.

Syntax


var fileInformationFactory = new Windows.Storage.BulkAccess.FileInformationFactory(queryResult, mode, requestedThumbnailSize, thumbnailOptions, delayLoad);

Parameters

queryResult

Type: IStorageQueryResultBase

The result of a query of files and folders on the system.

To learn about query result objects, see StorageFileQueryResult, StorageFolderQueryResult, and StorageItemQueryResult.

mode

Type: ThumbnailMode

A value that indicates the type of thumbnail view to retrieve for the StorageFile and StorageFolder.

requestedThumbnailSize

Type: Number [JavaScript] | System.UInt32 [.NET] | uint32 [C++]

The requested minimum size, in pixels, of the StorageFile and StorageFolder thumbnails.

If thumbnails are not required for IStorageItemInformation objects, set the requestedSize to 0.

thumbnailOptions

Type: ThumbnailOptions

The thumbnail retrieval options.

If you're using FileInformationFactory with the JavaScript ListView or XAML ListView and GridView controls, don't specify ThumbnailOptions.ReturnOnlyIfCached because this mode may prevent the control from being correctly populated with thumbnails.

delayLoad

Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

True to delay loading information; otherwise false. By default, this option is false and delay loading is not used.

If delayLoad is true, it authorizes the FileInformationFactory to return IStorageItemInformation objects before thumbnails are available. Subsequently, the system fires a ThumbnailUpdated event when thumbnails become available. Using delay loading is recommended because it makes apps seem more responsive.

If delayLoad is false (as it is by default), the system will require more time to retrieve IStorageItemInformation objects, but after the objects are retrieved all cached thumbnails will be accessible synchronously. Thumbnails that are not cached must still be accessed asynchronously in response to the ThumbnailUpdated event.

Remarks

If the query specified SetThumbnailPrefetch options, those options are overridden by the specified mode, requestedSize and options.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Storage.BulkAccess
Windows::Storage::BulkAccess [C++]

Metadata

Windows.winmd

See also

FileInformationFactory
FileInformationFactory(IStorageQueryResultBase, ThumbnailMode)
FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32)
FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions)

 

 

Show:
© 2014 Microsoft