The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SearchPane.PlaceholderText | placeholderText property

Applies to Windows only

The placeholder text in the search box when the user hasn't entered any characters.


var placeholderText = searchPane.placeholderText;
searchPane.placeholderText = placeholderText;

Property value

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

The placeholder text to display in the search box.


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 use the placeholder text to give the user an indication about what he or she can search for.

If the placeholder text is too long to fit in the search box, the system truncates the text without raising an exception.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported


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



See also

SearchPane class



© 2014 Microsoft. All rights reserved.