예제 #1
0
        protected override void OpenAssetDetails()
        {
            var dataContext = new BlogpostDetailsViewModel {
                Asset = SelectedAsset, IsInEditMode = false
            };
            var detailsView = new BlogpostDetailsView {
                DataContext = dataContext
            };

            detailsView.Show();
        }
예제 #2
0
        protected override void AddAsset()
        {
            var newBlogpost = new Blogpost();

            var blogpostEditDataContext = new BlogpostDetailsViewModel {
                Asset = newBlogpost, IsInEditMode = true
            };
            var blogpostEditWindow = new BlogpostDetailsView {
                DataContext = blogpostEditDataContext
            };

            blogpostEditWindow.Show();
        }