private void ShowDisplayView(string obj) { //FormArgs.TabSelectedIndex = (int)UserAdminTab.UserBasicInfo; _vmStateContext.BackingClass = obj; current = regionManager.Regions[RegionNames.WorkspaceRegion].Views.Count(); var ix = _viewCycler.CurrentPage == null ? 1 : _viewCycler.CurrentPage.PageIndex + 1; if (ix == 1 && current == 1) { //CloseView(obj); var singleView = regionManager.Regions[RegionNames.WorkspaceRegion].ActiveViews.FirstOrDefault(); regionManager.Regions[RegionNames.WorkspaceRegion].Deactivate(singleView); regionManager.Regions[RegionNames.WorkspaceRegion].Remove(singleView); var msg = new CloseViewMessage(); eventAggregator.GetEvent <CloseViewEvent>().Publish(msg); _viewCycler.Remove(_viewCycler.CurrentPage); FormArgs.ViewBackingClass = obj; } _vmStateContext.Change(new DisplayState()); _vmStateContext.Display(); ShowView(); }
public void Edit(VmStateContext vm) { vm.Change(new EditState()); }
public void Add(VmStateContext vm) { vm.Change(new AddState()); }