AlertController

AlertController is a popup easily configurable by code. It consists in:

  • A title,
  • A message,
  • 0 to 3 buttons
_images/alertcontroller_1.png

Displaying an AlertController

Namespace

using AsmodeeNet.UserInterface;

Instantiation

AlertController alert = AlertController.InstantiateAlertController("Title", "Message");
alert.AddAction("No", AlertController.ButtonStyle.Destructive, () => { });
alert.AddAction("Yes", AlertController.ButtonStyle.Default, () => { });

When you specify an action, you can precise a visual style: Default, Cancel, Destructive according to the meaning of the resulting action.

Skinning

You can skin the AlertController panel by following the process described in Skinning the User Interface.