There are cases where you need to create a UI for a routine situation, without having to build a real UI.
Like most other UI frameworks, Zebble provides these out of the box. They are also available in the ViewModel classes using the Dialog property.
The following shows how to use it inside your ViewModel definitions:
// Add an overlay (to stop the user touching anything) and show the spinning wait indicator
Dialog.ShowWaiting(bool block = true);
// Show the spinning wait indicator, but still allow the user to interact with the UI (rare scenario!)
// Remove the waiting and overlay
// Show a toast message:
// Show a message box
Dialog.Alert("Welcome", "Welcome to our app you good friend!");
// Show a few options to the user to pick
var decision = Dialog.Decide<string>("Please choose", "Please choose from the following options", Pair.Of("Option text 1", "Value1"), Pair.Of(...), ...);
// Show a confirmation message (shortcut for the decide method) where the buttons are "Cancel" and "Confirm"
var confirmed = Dialog.Confirm("Please confirm", "Do you want to blah blah?");
// Get a single string value from the user:
var text = Dialog.Prompt("Your name", "What is your name my friend?");