Ooui-tws-port/Samples/DisplayAlertPage.xaml.cs

35 lines
897 B
C#
Raw Normal View History

using Ooui;
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Samples
{
[XamlCompilation(XamlCompilationOptions.Compile)]
2017-11-19 18:49:17 +00:00
public partial class DisplayAlertPage : ContentPage
{
2017-11-19 18:49:17 +00:00
public DisplayAlertPage ()
{
InitializeComponent ();
}
protected override void OnAppearing ()
{
base.OnAppearing ();
status.Text = "Page appeared";
}
public async void OnButtonClicked(object sender, EventArgs args)
{
2017-11-26 17:28:26 +00:00
activity.IsRunning = true;
2017-11-26 17:43:52 +00:00
progress.Progress = 0.5;
2017-11-26 18:32:55 +00:00
var result = await DisplayAlert($"Alert @ {datePicker.Date}", "This is a test of the dialog. Is it working?", "YES", "NO");
await DisplayAlert("Alert Response", $"You selected value: {result}", "OK");
2017-11-26 17:28:26 +00:00
activity.IsRunning = false;
2017-11-26 17:43:52 +00:00
progress.Progress = 1.0;
}
2017-11-19 18:49:17 +00:00
}
}