Пример #1
0
        public WordEditor(WordEditorVM viewModel)
        {
            this.ViewModel = viewModel;
            this.DataContext = viewModel;
            InitializeComponent();

            this.ViewModel.OnClosed += ViewModel_OnClosed;
        }
 private void EditWord(object parameter)
 {
     var wordEditor = new WordEditorVM(this, this.SelectedWord);
     this.RaiseOnOpenEditor(wordEditor);
 }
 private void AddWord(object parameter)
 {
     var wordEditor = new WordEditorVM(this, null);
     this.RaiseOnOpenEditor(wordEditor);
 }
 public void RaiseOnOpenEditor(WordEditorVM editorVM)
 {
     if (OnOpenEditor != null)
         OnOpenEditor(this, new ViewModelArgs() { ViewModel = editorVM });
 }