Share via


SearchSuggestionManager.SearchHistoryEnabled Property

Definition

Indicates whether the user's previous searches with the app are automatically tracked and used to provide suggestions.

public:
 property bool SearchHistoryEnabled { bool get(); void set(bool value); };
bool SearchHistoryEnabled();

void SearchHistoryEnabled(bool value);
public bool SearchHistoryEnabled { get; set; }
var boolean = searchSuggestionManager.searchHistoryEnabled;
searchSuggestionManager.searchHistoryEnabled = boolean;
Public Property SearchHistoryEnabled As Boolean

Property Value

Boolean

bool

True if the user's search history is automatically tracked and used to provide suggestions; otherwise false. The default value is true.

Remarks

Set the SearchHistoryEnabled property to false to opt out of automatic suggestions, so your app can optionally provide its own suggestions instead. If you decide to have your app track its own search history, you should also give the user some control over their history through the Settings charm, like the ability to clear the history.

Changing the value of the SearchHistoryEnabled property doesn't immediately update the suggestions in the Suggestions property. Call SetQuery to update the Suggestions property.

Applies to

See also