IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase Interface

Definition

Provides methods to access to and manage query results.

public interface IStorageQueryResultBasepublic interface IStorageQueryResultBasePublic Interface IStorageQueryResultBasepublic interface IStorageQueryResultBase
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Folder Folder Folder Folder

Gets the folder originally used to create a StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult object. This folder represents the scope of the query.

public StorageFolder Folder { get; }public StorageFolder Folder { get; }Public ReadOnly Property Folder As StorageFolderpublic StorageFolder Folder { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

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

Applies new query options to the results retrieved by the StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult object.

public void ApplyNewQueryOptions(QueryOptions newQueryOptions)public void ApplyNewQueryOptions(QueryOptions newQueryOptions)Public Function ApplyNewQueryOptions(newQueryOptions As QueryOptions) As voidpublic void ApplyNewQueryOptions(QueryOptions newQueryOptions)
Parameters
newQueryOptions
QueryOptions QueryOptions QueryOptions QueryOptions

The new query options.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

When this method returns, the contents of the query and the count of items reflect the new query options.

This method causes the OptionsChanged event to fire.

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

Retrieves the index of the file 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 SortOrder list.

public IAsyncOperation<uint> FindStartIndexAsync(Object value)public IAsyncOperation<uint> FindStartIndexAsync(Object value)Public Function FindStartIndexAsync(value As Object) As IAsyncOperation( Of uint )public IAsyncOperation<uint> FindStartIndexAsync(Object value)
Parameters
value
System.Object System.Object System.Object System.Object

The property value to match when searching the query results.

Returns

When this method completes successfully it returns the index of the matched item in the query results.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

You can use this index in conjunction with Semantic Zoom to determine where the page should be zoomed in after the user selects the Semantic Zoom control.

GetCurrentQueryOptions() GetCurrentQueryOptions() GetCurrentQueryOptions() GetCurrentQueryOptions()

Retrieves the query options used to create a StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult object.

public QueryOptions GetCurrentQueryOptions()public QueryOptions GetCurrentQueryOptions()Public Function GetCurrentQueryOptions() As QueryOptionspublic QueryOptions GetCurrentQueryOptions()
Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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

Retrieves the number of items that match the query that created a StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult object.

public IAsyncOperation<uint> GetItemCountAsync()public IAsyncOperation<uint> GetItemCountAsync()Public Function GetItemCountAsync() As IAsyncOperation( Of uint )public IAsyncOperation<uint> GetItemCountAsync()
Returns

When this method completes successfully, it returns the number of items that match the query.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Events

ContentsChanged ContentsChanged ContentsChanged ContentsChanged

Fires when an item is added, deleted or modified in the folder being queried.

public abstract event TypedEventHandler ContentsChangedpublic abstract event TypedEventHandler ContentsChangedPublic MustInherit Event ContentsChangedpublic abstract event TypedEventHandler ContentsChanged
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

If you register a handler for this event, keep that handler registered while you suspend your app (in response to oncheckpoint or Suspending ). Your app will not receive ContentsChanged events while it is suspended and when your app resumes it will receive a single event that aggregates all of the changes if any occurred.

Additionally, keep in mind that registering and removing event handlers are synchronous operations and might cause your app to stop responding briefly if you execute them on your app's UI thread. Wherever possible, use a thread other than your app's UI thread to register and unregister these event handlers.

OptionsChanged OptionsChanged OptionsChanged OptionsChanged

Fires when the query options are changed for a StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult object.

public abstract event TypedEventHandler OptionsChangedpublic abstract event TypedEventHandler OptionsChangedPublic MustInherit Event OptionsChangedpublic abstract event TypedEventHandler OptionsChanged
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)