StorageItemQueryResult.GetItemsAsync StorageItemQueryResult.GetItemsAsync StorageItemQueryResult.GetItemsAsync StorageItemQueryResult.GetItemsAsync StorageItemQueryResult.GetItemsAsync Method

Definition

Overloads

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.

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

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

public : IAsyncOperation<IVectorView<IStorageItem>> GetItemsAsync()
IAsyncOperation<IVectorView<IStorageItem>> GetItemsAsync() const;
public IAsyncOperation<IReadOnlyList<IStorageItem>> GetItemsAsync()
Public Function GetItemsAsync() As IAsyncOperation<IReadOnlyList<IStorageItem>>(Of IVectorView)
Windows.Storage.Search.StorageItemQueryResult.getItemsAsync().done( /* Your success and error handlers */ );

Returns

IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>>

When this method completes successfully, it returns a list (type IVectorView ) of items. Each item is the IStorageItem type and represents a file, folder, or file group.

In this list, files are represented by storageFile objects, and folders or file groups are represented by storageFolder objects.

See also

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.

public : IAsyncOperation<IVectorView<IStorageItem>> GetItemsAsync(unsigned int startIndex, unsigned int maxNumberOfItems)
IAsyncOperation<IVectorView<IStorageItem>> GetItemsAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const;
public IAsyncOperation<IReadOnlyList<IStorageItem>> GetItemsAsync(UInt32 startIndex, UInt32 maxNumberOfItems)
Public Function GetItemsAsync(startIndex As UInt32, maxNumberOfItems As UInt32) As IAsyncOperation<IReadOnlyList<IStorageItem>>(Of IVectorView)
Windows.Storage.Search.StorageItemQueryResult.getItemsAsync(startIndex, maxNumberOfItems).done( /* Your success and error handlers */ );

Parameters

startIndex
UInt32 UInt32 UInt32

The zero-based index of the first item to retrieve. This parameter defaults to 0.

maxNumberOfItems
UInt32 UInt32 UInt32

The maximum number of items to retrieve. Use -1 to retrieve all items. If the range contains fewer items than the max number, all items in the range are returned.

Returns

IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>>

When this method completes successfully, it returns a list (type IVectorView ) of items. Each item is the IStorageItem type and represents a file, folder, or file group.

In this list, files are represented by storageFile objects, and folders or file groups are represented by storageFolder objects.

Remarks

You can use the isOfType method on both types of storage objects to find out whether an item is a storageFile or storageFolder object.

For C#/C++/VB: After you know whether the item is a StorageFile or StorageFolder, you can then cast the item to the appropriate type in order to access properties and methods specific to that object.

Use this overload to improve system performance by presenting a virtualized view of the query results that includes only the necessary subset of folders. For example, if your app displays many items in a gallery you could use this range to retrieve only the items that are currently visible to the user.

See also