StorageDataSource.StorageDataSource method

Creates a new StorageDataSource object.


storageDataSource.storageDataSource(query, options);



Type: Windows.Storage.Search.IStorageQueryResultBase

The IStorageQueryResultBase that the StorageDataSource obtains its items from.

Instead of IStorageQueryResultBase, you can also pass one of these string values:

Value Meaning

Access the Music library with musicView thumbnails sized at 256 by 256 pixels.


Access the Pictures library with picturesView thumbnails sized at 190 by 130 pixels.


Access the Videos library with videosView thumbnails sized at 190 by 130 pixels.


Access the Documents library with documentsView thumbnails sized at 40 by 40 pixels.



Type: Object

The set of properties and values to apply to the new StorageDataSource. Properties on this object may include:


A Windows.Storage.FileProperties.ThumbnailMode value that specifies the type of thumbnails requested (if any).


The requested size, in pixels, of the longest edge of the thumbnail. Windows uses this value as a guide and tries to scale the thumbnail image without reducing the quality of the image. If Windows can't find a thumbnail image that it can scale to meet the requested size, a larger thumbnail might be returned. If no larger thumbnail is available, a thumbnail image that is smaller than the requested size might be returned.


A Windows.Storage.FileProperties.ThumbnailOptions value that specifies additional options for retrieving thumbnails.


A boolean value that specifies whether items will only be returned with properties and thumbnails already delivered.

Return value

This method does not return a value.


Minimum WinJS version

WinJS 3.0



See also