Page.DisplayAlert Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- System.String
The title of the alert dialog.
- message
- System.String
The body text of the alert dialog.
- cancel
- System.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
- System.String
The title of the alert dialog.
- message
- System.String
The body text of the alert dialog.
- accept
- System.String
Text to be displayed on the 'Accept' button.
- cancel
- System.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.