IStorageQueryResultBase
IStorageQueryResultBase
IStorageQueryResultBase
IStorageQueryResultBase
Interface
Definition
Provides methods to access to and manage query results.
public : interface IStorageQueryResultBasepublic interface IStorageQueryResultBasePublic Interface IStorageQueryResultBase// You can use this interface in JavaScript.
- Attributes
| 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 StorageFolder// You can use this property in JavaScript.
The original folder.
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 void// You can use this method in JavaScript.
- newQueryOptions
- QueryOptions QueryOptions QueryOptions QueryOptions
The new query options.
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 QueryOptions.SortOrder list.
public : IAsyncOperation<unsigned int> FindStartIndexAsync(PlatForm::Object value)public IAsyncOperation<uint> FindStartIndexAsync(Object value)Public Function FindStartIndexAsync(value As Object) As IAsyncOperation( Of uint )// You can use this method in JavaScript.
- value
- PlatForm::Object Object Object Object
The property value to match when searching the query results.
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// You can use this method in JavaScript.
The query options.
GetItemCountAsync() GetItemCountAsync() GetItemCountAsync() GetItemCountAsync()
Retrieves the number of items that match the query that created a StorageFileQueryResult, StorageFolderQueryResult, or StorageItemQueryResult object.
public : IAsyncOperation<unsigned int> GetItemCountAsync()public IAsyncOperation<uint> GetItemCountAsync()Public Function GetItemCountAsync() As IAsyncOperation( Of uint )// You can use this method in JavaScript.
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 ContentsChanged<IStorageQueryResultBase, object>public abstract event TypedEventHandler ContentsChanged<IStorageQueryResultBase, object>Public MustInherit Event ContentsChanged<IStorageQueryResultBase, object>// You can use this event in JavaScript.
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 OptionsChanged<IStorageQueryResultBase, object>public abstract event TypedEventHandler OptionsChanged<IStorageQueryResultBase, object>Public MustInherit Event OptionsChanged<IStorageQueryResultBase, object>// You can use this event in JavaScript.