public void CtorTest() { var viewModel = new PopupDialogViewModel(); var expected = PopupDialogButtons.OK | PopupDialogButtons.Cancel; var actual = viewModel.Buttons; Assert.AreEqual(expected, actual); }
public PopupDialogView(PopupDialogViewModel popupDialogViewModel) { InitializeComponent(); if (popupDialogViewModel != null) { this.DataContext = popupDialogViewModel; } Region = ServiceLocator.Current.GetInstance <IRegionManager>().Regions[RegionNames.Modal]; Region.ActiveViews.ToList().ForEach(vw => Region.Deactivate(vw)); }