Share via


SearchSuggestionManager.AddToHistory Method

Definition

Overloads

AddToHistory(String)

Stores the specified query in the search history.

AddToHistory(String, String)

Stores the specified query and input language in the search history.

AddToHistory(String)

Stores the specified query in the search history.

public:
 virtual void AddToHistory(Platform::String ^ queryText) = AddToHistory;
/// [Windows.Foundation.Metadata.Overload("AddToHistory")]
void AddToHistory(winrt::hstring const& queryText);
[Windows.Foundation.Metadata.Overload("AddToHistory")]
public void AddToHistory(string queryText);
function addToHistory(queryText)
Public Sub AddToHistory (queryText As String)

Parameters

queryText
String

Platform::String

winrt::hstring

The query.

Attributes

Remarks

The SearchBox control calls the AddToHistory method when the query entry is committed, to add it to the current history context.

Calling the AddToHistory method doesn't immediately update the suggestions in the Suggestions property. Call SetQuery to update the Suggestions property.

See also

Applies to

AddToHistory(String, String)

Stores the specified query and input language in the search history.

public:
 virtual void AddToHistory(Platform::String ^ queryText, Platform::String ^ language) = AddToHistory;
/// [Windows.Foundation.Metadata.Overload("AddToHistoryWithLanguage")]
void AddToHistory(winrt::hstring const& queryText, winrt::hstring const& language);
[Windows.Foundation.Metadata.Overload("AddToHistoryWithLanguage")]
public void AddToHistory(string queryText, string language);
function addToHistory(queryText, language)
Public Sub AddToHistory (queryText As String, language As String)

Parameters

queryText
String

Platform::String

winrt::hstring

The query.

language
String

Platform::String

winrt::hstring

The input language. The input language ensures that the query string is displayed in the search history for the correct language.

Attributes

Remarks

The SearchBox control calls the AddToHistory method when the query entry is committed, to add it to the current history context.

Calling the AddToHistory method doesn't immediately update the suggestions in the Suggestions property. Call SetQuery to update the Suggestions property.

See also

Applies to