The .NET Command Pattern, Part 2: Listing 8

IPresentationView code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
 
namespace VSMCommandPatternUndo
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window, View.IPresentationView
    {
        ViewModel.Presentation _model = new ViewModel.Presentation();
        public ViewModel.Presentation Model
        {
            get
            {
                return _model;
            }
            set
            {
                _model = value;
            }
        }
 
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
        }
    }
}

About the Author

Eric Vogel is a Senior Software Developer for Red Cedar Solutions Group in Okemos, Michigan. He is the president of the Greater Lansing User Group for .NET. Eric enjoys learning about software architecture and craftsmanship, and is always looking for ways to create more robust and testable applications. Contact him at vogelvision@gmail.com.