SearchSuggestionCollection Class

Definition

Represents a collection of search suggestions to be displayed in the search pane in response to a suggestionsrequested event.

public ref class SearchSuggestionCollection sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SearchSuggestionCollection final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SearchSuggestionCollection
Public NotInheritable Class SearchSuggestionCollection
Inheritance
Object Platform::Object IInspectable SearchSuggestionCollection
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Important

To implement search in an app for Windows 10 or later, use AutoSuggestBox. See Auto-suggest box for more info.

You should not use Windows.ApplicationModel.Search APIs (SearchPane, SearchContract) or SearchBox APIs in apps for Windows 10 or later.

The search pane can display 5 suggestions, at most. Additionally, each separator you use takes the place of a suggestion and lowers the number of suggestions that you can display.

An app retrieves this object through the SearchPaneSuggestionsRequest.searchSuggestionCollection property while handling a SuggestionsRequested event.

Properties

Size

The number of suggestions in the collection.

Methods

AppendQuerySuggestion(String)

Appends a query suggestion to the list of search suggestions for the search pane.

AppendQuerySuggestions(IIterable<String>)

Appends a list of query suggestions to the list of search suggestions for the search pane.

AppendResultSuggestion(String, String, String, IRandomAccessStreamReference, String)

Appends a suggested search result to the list of suggestions to display in the search pane.

AppendSearchSeparator(String)

Appends a text label that is used to separate groups of suggestions in the search pane.

Applies to

See also