ATTENZIONE: Questo sito impiega diversi tipi di cookies. Alla pagina MAGGIORI INFORMAZIONI è possibile avere informazioni aggiuntive. Cliccando su ACCETTO o continuando a navigare sul sito acconsenti al loro utilizzo.
<aprile 2024>
lunmarmergiovensabdom
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345
Immagini

UniversalApp - MessageBox

  • Aggiungere la using Windows.UI.Popups;
  • Creazione Messaggio:
    • var messageDialog = new MessageDialog("my message" [, "MESSAGE"]);
  • Aggiunta bottoni (opzionale)
    • messageDialog.Commands.Add(new UICommand("OK", new UICommandInvokedHandler(this.CommandInvokedHandler)));
    • messageDialog.Commands.Add(new UICommand("Cancel", new UICommandInvokedHandler(this.CommandInvokedHandler)));
    • messageDialog.DefaultCommandIndex = 0;
    • messageDialog.CancelCommandIndex = 1;
  • Esecuzione del Messaggio:
    • await messageDialog.ShowAsync();
  • Aggiunta gestore evento bottoni (opzionale)
    • private void CommandInvokedHandler(IUICommand command)
    • {
    •     // Do something here on the command handler
    • }

 

Notifiche