Share via


SearchSuggestionManager.SearchHistoryContext Property

Definition

Identifies the context of the search and is used to store the user's search history with the app.

public:
 property Platform::String ^ SearchHistoryContext { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring SearchHistoryContext();

void SearchHistoryContext(winrt::hstring value);
public string SearchHistoryContext { get; set; }
var string = searchSuggestionManager.searchHistoryContext;
searchSuggestionManager.searchHistoryContext = string;
Public Property SearchHistoryContext As String

Property Value

String

Platform::String

winrt::hstring

The search history context string.

Remarks

The search history context string is used as a secondary key for storing search history. The primary key is the AppId. An app can use the search history context string to store different search histories based on the context of the application.

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

If you don't set this property, Windows assumes that all searches in your app occur in the same context.

Applies to

See also