public DialogResult ShowModalMessageExternal(object context, string title, string message, DialogStyle style = DialogStyle.Affirmative, IDialogSettings settings = null) => Instance.ShowModalMessageExternal( context, title, message, style.ToMetroDialogStyle(), settings?.ToMetroDialogSettings()).ToDialogResult();
public async Task <DialogResult> ShowMessageAsync(object context, string title, string message, DialogStyle style = DialogStyle.Affirmative, IDialogSettings settings = null) { var result = await Instance.ShowMessageAsync( context, title, message, style.ToMetroDialogStyle(), settings?.ToMetroDialogSettings()); return(result.ToDialogResult()); }
public async Task HideDialogAsync(object context, IDialogInstance dialog, IDialogSettings settings = null) { // Get the current dialog var metroDialog = await Instance.GetCurrentDialogAsync <BaseMetroDialog>(context); // Perform a very simply check to see if the correct dialog is returned, then hide it if (metroDialog is not null && metroDialog.Title == dialog.Title) { await Instance.HideMetroDialogAsync(context, metroDialog, settings?.ToMetroDialogSettings()); } }
public string ShowModalInputExternal(object context, string title, string message, IDialogSettings settings = null) => Instance.ShowModalInputExternal(context, title, message, settings?.ToMetroDialogSettings());
public Task <string> ShowInputAsync(object context, string title, string message, IDialogSettings settings = null) => Instance.ShowInputAsync(context, title, message, settings?.ToMetroDialogSettings());