Class StorageDataSource

A type of IListDataSource that provides read-access to an object that implements the IStorageQueryResultBase interface. A StorageDataSource enables you to query and bind to items in the data source.

Index

Constructor methods

Methods

Constructor methods

constructor(query: any, options?: any): StorageDataSource

Creates a new StorageDataSource object.

constructor

Parameters

  • query: any

    The IStorageQueryResultBase that the StorageDataSource obtains its items from. Instead of IStorageQueryResultBase, you can also pass one of these string values: Music, Pictures, Videos, Documents.

  • options?: any optional

    The set of properties and values to apply to the new StorageDataSource. Properties on this object may include: mode , requestedThumbnailSize , thumbnailOptions , synchronous .

Returns

StorageDataSource

Methods

public loadThumbnail(item: IItem, image: HTMLImageElement): Promise

Draws the thumbnail for the specified item to the specified img element.

Parameters

  • item: IItem

    The item to retrieve the thumbnail for.

  • image: HTMLImageElement

    The img element that will display the thumbnail.

Returns

Promise

A Promise that completes when the full-quality thumbnail is visible.