Example #1
0
        private void ApplicationStartUp(object sender, StartupEventArgs e)
        {
            var spellChecker = new SpellCheckerService(new NetspellSpellChecker());

            var notepadViewModel = new NotepadViewModel(spellChecker);

            var notepadView = new NotepadView(notepadViewModel);

            notepadView.Show();
        }
        public MainWindow()
        {
            InitializeComponent();
            NotepadViewModel viewModel = new NotepadViewModel();

            DataContext          = viewModel;
            notepad.TextChanged += viewModel.text_Changed;
            mainWindow.Closed   += viewModel.CloseWin;
            viewModel.Npad       = notepad;
        }