/// <summary> /// Shows this dialog with the provided view model. /// </summary> /// <param name="viewModel"></param> /// <returns></returns> public static bool?ShowDialog(UpdateDetectedDialogModel viewModel) { var dialog = new UpdateDetectedDialog(); dialog.SetModel(viewModel); return(dialog.ShowModal()); }
void SetModel(UpdateDetectedDialogModel viewModel) { Host.DataContext = viewModel; viewModel.Closing += OnModelClosing; }