Compartir a través de


ContentDialog.onbeforeshow event

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

Synchronous No
Bubbles Yes
Cancelable Yes

 

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