using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; namespace displayAlert { public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); } private async void Button_Clicked(object sender, EventArgs e) { await DisplayAlert("Alert", "To jest alert z przyciskiem OK, bez obsługi tego przycisku", "OK"); } private async void Button_Clicked_1(object sender, EventArgs e) { var odp = await DisplayAlert("Alert", "To jest alert z przyciskiem OK oraz Cancel, z obsługą tych przycisków", "OK", "Cancel"); if (odp == true) { await DisplayAlert("Alert", "Nacisnięto OK", "OK"); } else { await DisplayAlert("Alert", "Nacisnięto Cancel", "OK"); } } } }