Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StorageFolderQueryResult.FindStartIndexAsync | findStartIndexAsync method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Retrieves the index of the folder 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.

Syntax


storageFolderQueryResult.findStartIndexAsync(value).done( /* Your success and error handlers */ );

Parameters

value

Type: Object [JavaScript] | System.Object [.NET] | Platform::Object [C++]

The property value to match when searching the query results. The property to that is used to match this value is the property in the first SortEntry of the QueryOptions.SortOrder list.

Return value

Type: IAsyncOperation<UInt32>

When this method completes successfully it returns the index of the matched folder 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. To learn about SemanticZoom in JavaScript, see Quickstart: adding SemanticZoom controls. To learn about SemanticZoom in C#/C++/VB, see Quickstart: adding SemanticZoom controls.

Examples

This example shows how to find the first album that has a title that begins with an "R" in a set of query results that contains albums sorted by title.


var queryOptions = new Windows.Storage.Search.QueryOptions();
queryOptions.folderDepth = Windows.Storage.Search.FolderDepth.deep;
queryOptions.indexerOption = Windows.Storage.Search.IndexerOptions.onlyUseIndexer;
queryOptions.sortOrder.append({
	ascendingOrder: true,
	propertyName: "System.Music.AlbumTitle"
});

var queryResult = Windows.Storage.KnownFolders.picturesLibrary.createFolderQueryWithOptions(queryOptions);
var firstIndex = queryResult.findStartIndexAsync("R");

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage.Search
Windows::Storage::Search [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows 10 Mobile Insider Preview

Namespace

Windows.Storage.Search
Windows::Storage::Search [C++]

Metadata

Windows.winmd

See also

StorageFolderQueryResult

 

 

Show:
© 2015 Microsoft