Information
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.VisibilityChanged | visibilitychanged event

Fires when the user opens or closes the search pane.

Syntax


function onVisibilityChanged(eventArgs) { /* Your code */ }
 
// addEventListener syntax
searchPane.addEventListener("visibilitychanged", onVisibilityChanged);
searchPane.removeEventListener("visibilitychanged", onVisibilityChanged);
 
- or -

searchPane.onvisibilitychanged = onVisibilityChanged;


Event information

Delegate TypedEventHandler<SearchPane, SearchPaneVisibilityChangedEventArgs>

Remarks

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

Register to be notified when this event fires by adding an event listener to the searchPane and assigning a handler function for the event. You can access information about the event with the searchPaneVisibilityChangedEventArgs object that is passed to your event handler.

Requirements (Windows 10 device family)

Device family

Desktop, introduced version 10.0.10240.0
Xbox, introduced version 10.0.10586.0

API contract

Windows.ApplicationModel.Search.SearchContract, introduced version 1.0

Namespace

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

Metadata

Windows.ApplicationModel.Search.SearchContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

SearchPane class
SearchPane.Show methods
SearchPane.Visible property
SearchPaneVisibilityChangedEventArgs class

 

 

Show: