Xamarin.Forms Guides | Samples

Xamarin.Forms.Page.DisplayAlert Method

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

Syntax

public System.Threading.Tasks.Task<bool> DisplayAlert (String title, String message, String accept, String cancel)

Parameters

title
The title of the alert dialog.
message
The body text of the alert dialog.
accept
Text to be displayed on the 'Accept' button.
cancel
Text to be displayed on the 'Cancel' button.

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0