Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.6 KB

searchpane_placeholdertext.md

File metadata and controls

38 lines (24 loc) · 1.6 KB
-api-id -api-type
P:Windows.ApplicationModel.Search.SearchPane.PlaceholderText
winrt property

Windows.ApplicationModel.Search.SearchPane.PlaceholderText

-description

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

-property-value

The placeholder text to display in the search box.

-remarks

Important

To implement search in an app for Windows 10 or later, use AutoSuggestBox. See Auto-suggest box for more info.

You should not use Windows.ApplicationModel.Search APIs (SearchPane, SearchContract) or SearchBox APIs in apps for Windows 10 or later.

Note

An app can't use both the search box (Windows.UI.Xaml.Controls.SearchBox/WinJS.UI.SearchBox) 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.

-examples

-see-also

SearchPane class