internal AddWordsView(Model.EditorModel model) { InitializeComponent(); DataContext = new AddWordsViewModel(this, model); Loaded += (sender, args) => { InputTextBlock.Focus(); }; }
public AddWordsViewModel(View.AddWordsView view, Model.EditorModel model) { // Initialize Model and ViewModel this.view = view; this.model = model; // Binding commands with behavior OkCommand = new RelayCommand <object>(OkExecute, OkCanExecute); CancelCommand = new RelayCommand <object>(CancelExecute); }