SearchBox.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.
Gets or sets a string that 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 = searchBox.searchHistoryContext;
searchBox.searchHistoryContext = string;
Public Property SearchHistoryContext As String
<SearchBox SearchHistoryContext="string"/>
Property Value
A string that identifies the context of the search. The default is an empty string ("").
Remarks
The search history context string is used as a secondary key for storing search history. The primary key is the AppId. You can use the search history context string to store different search histories for different pages or search entry points in the app. If you don't set this property, Windows assumes that all searches in your app occur in the same context.