I use C#. I want to make a method that will do some stuff and then wait for the user to click one of four buttons. I want something similar to the MessageDialog async method that waits the user to click in this case, "Yes" or "No":
private async void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
var x = new MessageDialog("Yes or no?", "Choose");
x.Commands.Add(new UICommand("Yes", (UICommandInvokeHandler) =>
{
// blabla
}));
x.Commands.Add(new UICommand("No", (UICommandInvokeHandler) =>
{
// blabla
}));
await x.ShowAsync();
}
The problem is that I can't use this method (MessageDialog) because I want 4 options but MessageDialog is up to 3.
EDIT:
private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
// doing some stuff
Method();
// doing some other stuff
}
private void Method()
{
// makes everything in UI invisible
// then makes the four buttons that were previously invisible, //visible
// here I want the program to stop and wait the user to press one of //the four buttons
// and then make the UI visible and the 4 buttons invisibl
}