Page.DisplayAlert Method

Definition

Overloads

DisplayAlert(String, String, String)

Presents an alert dialog to the application user with a single cancel button.

DisplayAlert(String, String, String, String)

Presents an alert dialog to the application user with an accept and a cancel button.

DisplayAlert(String, String, String)

Presents an alert dialog to the application user with a single cancel button.

public System.Threading.Tasks.Task DisplayAlert (string title, string message, string cancel);
member this.DisplayAlert : string * string * string -> System.Threading.Tasks.Task

Parameters

title
String

The title of the alert dialog.

message
String

The body text of the alert dialog.

cancel
String

Text to be displayed on the 'Cancel' button.

Returns

Applies to

DisplayAlert(String, String, String, String)

Presents an alert dialog to the application user with an accept and a cancel button.

public System.Threading.Tasks.Task<bool> DisplayAlert (string title, string message, string accept, string cancel);
member this.DisplayAlert : string * string * string * string -> System.Threading.Tasks.Task<bool>

Parameters

title
String

The title of the alert dialog.

message
String

The body text of the alert dialog.

accept
String

Text to be displayed on the 'Accept' button.

cancel
String

Text to be displayed on the 'Cancel' button.

Returns

A task that contains the user's choice as a Boolean value. true indicates that the user accepted the alert. false indicates that the user cancelled the alert.

Applies to