Skip to content

Alerting

Vetle444 edited this page Jun 26, 2023 · 6 revisions

System Message

A system message is a message that is displayed at the top of the screen.

Inspiration

Android Developer - Toast

Configuration

A system message can be configured when calling the function to display the system message, with the ISystemMessageConfigurator interface.

Usage

In the following example a system message with the text: "A system message" and a duration of 2 seconds is displayed.

SystemMessageService.Display(config =>
        {
            config.Text = "A system message";
            config.Duration = 2000;
        });

Dialogs

Dialogs presents critical information that users needs right away. There are three different dialogs:

  • Regular. A dialog with a title, description and a single button.
  • Confirmation. A dialog with a title, description, a cancel button and a confirmation button.
  • Destructive. A dialog with a title, description, a cancel button and a destructive button.

Inspiration

Material Design 2 - Dialogs

iOS Developer - Alerts

Usage

In the following example a Regular dialog is presented with title, description and action title set. The function will return a DialogAction that either tells the system that the user cancelled the dialog or tapped the action button.

 var result = await DialogService.ShowMessage("Title", 
                "Description", 
                "OK");

API

Inspect the DialogService class to examine how it is used.

Clone this wiki locally