onbeforeshow event

ContentDialog.onbeforeshow event

Applies to Windows and Windows Phone

Occurs before the dialog is shown. When you call preventDefault on this event, the dialog does not show and the show promise is completed with a canceled promise.

Syntax


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
contentDialog.addEventListener("beforeshow", handler);
contentDialog.removeEventListener("beforeshow", handler);
 
- or -

contentDialog.onbeforeshow = handler;


Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

eventInfo

Type: Event

An object that contains information about the event.

Requirements

Minimum WinJS version

WinJS 4.0

Namespace

WinJS.UI

See also

ContentDialog

 

 

Show:
© 2017 Microsoft