public static bool ShowModalWindow(WindowBaseViewModel windowBaseViewModel) { try { WindowBaseView win = new WindowBaseView(windowBaseViewModel); PrepareWindow(windowBaseViewModel); bool? result = win.ShowDialog(); return result.HasValue ? result.Value : false; } catch (Exception e) { Logger.Error(e, "DialogService.ShowModalWindow"); } return false; }
public static bool ShowModalWindow(WindowBaseViewModel model, bool allowsTransparency = true) { try { WindowBaseView win = new WindowBaseView(model); win.AllowsTransparency = allowsTransparency; PrepareWindow(model); bool? result = win.ShowDialog(); return result.HasValue ? result.Value : false; } catch (Exception e) { Logger.Error(e, "Исключение при вызове DialogService.ShowModalWindow"); throw; } }