SearchSuggestionManager.SearchHistoryContext Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.