public static void Show(Type viewModelType) { var targetDialog = OpenDialogMappings.Where(d => d.Value == viewModelType).Select(d => d.Key).FirstOrDefault(); if (targetDialog != null) { targetDialog.Show(); } }
public static void CloseDialog(Type viewModelType) { var targetDialog = OpenDialogMappings.Where(d => d.Value == viewModelType).Select(d => d.Key).FirstOrDefault(); if (targetDialog != null) { targetDialog.Close(); OpenDialogMappings.Remove(targetDialog); } }