コード例 #1
0
        void CreateWebSite()
        {
            var newWebSite = WebSiteViewModel.CreateNew(this.webSiteManager, this.mediator);

            WebSites.Add(newWebSite);
            SetActiveWebSite(newWebSite);
        }
コード例 #2
0
        void SetActiveWebSite(WebSiteViewModel webSite)
        {
            Debug.Assert(WebSites.Contains(webSite));

            ICollectionView collectionView = CollectionViewSource.GetDefaultView(WebSites);

            if (collectionView != null)
            {
                collectionView.MoveCurrentTo(webSite);
            }
        }