Megosztás a következőn keresztül:


SearchSuggestionCollection.AppendQuerySuggestion(String) Method

Definition

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

public:
 virtual void AppendQuerySuggestion(Platform::String ^ text) = AppendQuerySuggestion;
void AppendQuerySuggestion(winrt::hstring const& text);
public void AppendQuerySuggestion(string text);
function appendQuerySuggestion(text)
Public Sub AppendQuerySuggestion (text As String)

Parameters

text
String

Platform::String

winrt::hstring

The text of the query suggestion.

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.

A query suggestion is a suggestion that the user can select as his or her query.

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.

Applies to

See also