Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.51 KB

searchpane_getforcurrentview_1363600702.md

File metadata and controls

31 lines (22 loc) · 1.51 KB
-api-id -api-type
M:Windows.ApplicationModel.Search.SearchPane.GetForCurrentView
winrt method

Windows.ApplicationModel.Search.SearchPane.GetForCurrentView

-description

Retrieves an instance of the search pane from which users can search within the app.

-returns

An instance of the search pane, which provides a consistent, touch-friendly search box and optional search suggestions for searching within the current application.

-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.'"

-examples

-see-also

SearchPane class