IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase Interface

Provides methods to access to and manage query results.

Syntax

Declaration

public interface IStorageQueryResultBasepublic interface IStorageQueryResultBasePublic Interface IStorageQueryResultBase

Properties summary

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

Methods summary

Applies new query options to the results retrieved by the StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult 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.

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

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

Events summary

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

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

Properties

Methods

  • ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions)
    ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions)
    ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions)
    ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions)

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

    public void ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions)public void ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions)Public Function ApplyNewQueryOptions(Windows.Storage.Search.QueryOptions) As void

    Parameters

    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(System.Object)
    FindStartIndexAsync(System.Object)
    FindStartIndexAsync(System.Object)
    FindStartIndexAsync(System.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(System.Object)public IAsyncOperation<uint> FindStartIndexAsync(System.Object)Public Function FindStartIndexAsync(System.Object) As IAsyncOperation( Of uint )

    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.

    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 QueryOptions

    Returns

  • 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 )

    Returns

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

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 ContentsChanged

    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 OptionsChanged

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.GuidAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Storage.Search.dll