mahapp messagedialog usage

  • 59
  • 0

mahapp messagedialog usage

----------------

this.MetroDialogOptions.ColorScheme = MetroDialogColorScheme.Accented;

    var msgbox_settings = new MetroDialogSettings { AffirmativeButtonText = metromsgbox_yes, NegativeButtonText = metromsgbox_no };

    var msgbox_result = await this.ShowMessageAsync(
        msgbox_logout_title, msgbox_logout_message, MessageDialogStyle.AffirmativeAndNegative, msgbox_settings);

    _shutdown = msgbox_result == MessageDialogResult.Affirmative;

    if (_shutdown)
    {
        if (NotifyIcon != null) NotifyIcon.Dispose();
        Application.Current.Shutdown();
    }

------------------

Source :  https://github.com/MahApps/MahApps.Metro/issues/1523