StorageItemQueryResult StorageItemQueryResult StorageItemQueryResult StorageItemQueryResult StorageItemQueryResult Class


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.

public : sealed class StorageItemQueryResult : IStorageQueryResultBase
struct winrt::Windows::Storage::Search::StorageItemQueryResult : IStorageQueryResultBase
public sealed class StorageItemQueryResult : IStorageQueryResultBase
Public NotInheritable Class StorageItemQueryResult Implements IStorageQueryResultBase
// This class does not provide a public constructor.

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)



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:


Folder Folder Folder Folder Folder

Gets the folder originally used to create the StorageItemQueryResult object. This folder represents the scope of the query.


ApplyNewQueryOptions(QueryOptions) ApplyNewQueryOptions(QueryOptions) ApplyNewQueryOptions(QueryOptions) ApplyNewQueryOptions(QueryOptions) ApplyNewQueryOptions(QueryOptions)

Modifies query results based on new QueryOptions.

FindStartIndexAsync(Object) FindStartIndexAsync(Object) FindStartIndexAsync(Object) FindStartIndexAsync(Object) FindStartIndexAsync(Object)

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() GetCurrentQueryOptions() GetCurrentQueryOptions() GetCurrentQueryOptions() GetCurrentQueryOptions()

Retrieves the query options used to determine query results.

GetItemCountAsync() GetItemCountAsync() GetItemCountAsync() GetItemCountAsync() GetItemCountAsync()

Retrieves the number of items in the set of query results.

GetItemsAsync() GetItemsAsync() GetItemsAsync() GetItemsAsync() GetItemsAsync()

Retrieves a list of all the items (files and folders) in the query results set.

GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32)

Retrieves a list of items (files and folders) in a specified range.


ContentsChanged ContentsChanged ContentsChanged ContentsChanged ContentsChanged

Fires when an item is added to, deleted from, or modified in the folder being queried. This event only fires after GetItemsAsync has been called at least once.

OptionsChanged OptionsChanged OptionsChanged OptionsChanged OptionsChanged

Fires when the query options change.

See also