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