SearchBox.SearchHistoryContext SearchBox.SearchHistoryContext SearchBox.SearchHistoryContext SearchBox.SearchHistoryContext Property

Definition

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 : Platform::String SearchHistoryContext { get; set; }
winrt::hstring SearchHistoryContext();

void SearchHistoryContext(winrt::hstring searchhistorycontext);
public string SearchHistoryContext { get; set; }
Public ReadWrite Property SearchHistoryContext As string
<SearchBox SearchHistoryContext="string"/>

Property Value

string string

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.