StorageItemQueryResult class

Applies to Windows only

Provides access to the results of a query that lists all items including files and folders (or file groups) in the folder being queried (which is represented by a storageFolder). You can use storageItemQueryResult to enumerate the files and folders in that storageFolder.


var storageItemQueryResult = storageFolder.createItemQuery();




The StorageItemQueryResult class has these types of members:


The StorageItemQueryResult class has these events.

ContentsChanged Fires when an item is added to, deleted from, or modified in the folder being queried.
OptionsChanged Fires when the query options change.



The StorageItemQueryResult class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

ApplyNewQueryOptions Modifies query results based on new QueryOptions.
FindStartIndexAsync Retrieves the index of the item from the query results that most closely matches the specified property value. The property that is matched is determined by the first SortEntry of the QueryOptions.SortOrder list.
GetCurrentQueryOptions Retrieves the query options used to determine query results.
GetItemCountAsync Retrieves the number of items in the set of query results.
GetItemsAsync() Retrieves a list of all the items (files and folders) in the query results set.
GetItemsAsync(UInt32, UInt32) Retrieves a list of items (files and folders) in a specified range.



The StorageItemQueryResult class has these properties.

PropertyAccess typeDescription


Read-onlyGets the folder originally used to create the StorageItemQueryResult object.



Note  Although it's not attributed with marshalling_behavior(agile), this class can be treated as agile. For more info, see Threading and Marshaling (C++/CX).

You can get a storageItemQueryResult object by calling the following methods from a storageFolder or a folderInformation object:

For related code examples, see storageFileQueryResult, storageFolderQueryResult, the Folder enumeration sample, and the File system search sample.


Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported


Windows::Storage::Search [C++]



See also

storageItemQueryResult class
storageItemQueryResult.getItemsAsync methods
Windows.Storage.storageFolder.createItemQuery methods
Windows.Storage.storageFolder.createItemQueryWithOptions method
Windows.Storage.BulkAccess.folderInformation.createItemQuery methods
Windows.Storage.BulkAccess.folderInformation.createItemQueryWithOptions method



© 2015 Microsoft