public void ShowMessageDialog(string title, string message) {
MainWindow MainWindow = App.Kernel.Get<MainWindow>();
if (MainWindow.Dispatcher != null && !MainWindow.Dispatcher.CheckAccess()) {
MainWindow.Dispatcher.BeginInvoke(new Func<string, string, bool>((t, m) => {
ShowMessageDialog(t, m);
return true;
}), title, message);
return;
}
MainWindow.ShowMessageAsync(title, message, MessageDialogStyle.Affirmative, new MetroDialogSettings() {
AffirmativeButtonText = "OK",
ColorScheme = MetroDialogColorScheme.Accented
});
}