Windows Dev Center

SearchBox.SearchHistoryContext property

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.

Syntax


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


<SearchBox SearchHistoryContext="string"/>

Property value

Type: System.String [.NET] | Platform::String [C++]

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.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

SearchBox

 

 

Show:
© 2015 Microsoft