示例#1
0
        protected override void OpenAssetDetails()
        {
            var dataContext = new PodcastDetailsViewModel {
                Asset = SelectedAsset, IsInEditMode = false
            };
            var detailsView = new PodcastDetailsView {
                DataContext = dataContext
            };

            detailsView.Show();
        }
示例#2
0
        protected override void AddAsset()
        {
            var newPodcast = new Podcast();

            var podcastEditDataContext = new PodcastDetailsViewModel {
                Asset = newPodcast, IsInEditMode = true
            };
            var podcastEditWindow = new PodcastDetailsView {
                DataContext = podcastEditDataContext
            };

            podcastEditWindow.Show();
        }