void CreateWebSite() { var newWebSite = WebSiteViewModel.CreateNew(this.webSiteManager, this.mediator); WebSites.Add(newWebSite); SetActiveWebSite(newWebSite); }
void SetActiveWebSite(WebSiteViewModel webSite) { Debug.Assert(WebSites.Contains(webSite)); ICollectionView collectionView = CollectionViewSource.GetDefaultView(WebSites); if (collectionView != null) { collectionView.MoveCurrentTo(webSite); } }