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

28 lines
963 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 ();
}
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;
var result = await DisplayAlert("Alert Message", "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa.", "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
}
}