コード例 #1
0
        internal AddWordsView(Model.EditorModel model)
        {
            InitializeComponent();

            DataContext = new AddWordsViewModel(this, model);

            Loaded += (sender, args) => { InputTextBlock.Focus(); };
        }
コード例 #2
0
        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);
        }