private async Task<bool> ShowMessageDialogAsyncInternal(string title, string message) {
MainWindow MainWindow = App.Kernel.Get<MainWindow>();
if (MainWindow.Dispatcher != null && !MainWindow.Dispatcher.CheckAccess()) {
return await MainWindow.Dispatcher.Invoke<Task<bool>>(new Func<Task<bool>>(async () => {
return await ShowMessageDialogAsyncInternal(title, message);
}));
}
await MainWindow.ShowMessageAsync(title, message, MessageDialogStyle.Affirmative, new MetroDialogSettings() {
AffirmativeButtonText = "OK",
ColorScheme = MetroDialogColorScheme.Accented
});
return true;
}