SearchPane.SearchHistoryEnabled | searchHistoryEnabled property

Applies to Windows only

Indicates whether the user's previous searches with the app are automatically tracked and used to provide suggestions.


property bool SearchHistoryEnabled { 
   bool get();
   void set (bool value);

Property value

Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

True if the user's search history is automatically tracked and used to provide suggestions; otherwise false. The default value is true.


Note  An app can't use both the search box (Windows.UI.Xaml.Controls.SearchBox for Windows Store apps using C++, C#, or Visual Basic, WinJS.UI.SearchBox for Windows Store apps using JavaScript) and the SearchPane. Using both the search box and the search pane in the same app causes the app to throw an exception with this message: "Cannot create instance of type 'Windows.UI.Xaml.Controls.SearchBox.'"

You can set this property to false to opt out of automatic suggestions; your app can optionally provide its own suggestions to users instead. If you decide to have your app track its own search history, you should also give the user some control over their history through the Settings charm, like the ability to clear the history.

If you set this property while the search pane is open, the change won't take effect until the user enters the next character of their query.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported


Windows::ApplicationModel::Search [C++]



See also

Guidelines and checklist for search
SearchPane class
SearchPane.SearchHistoryContext property



© 2014 Microsoft