protected BaseAppEditorVM(Window w) { view = w; view.DataContext = this; view.Owner = AppData.MainWindowView; mode = EditType.NotSet; OKButtonCommand = new RelayCommand(OKAction); CancelButtonCommand = new RelayCommand(CancelAction); }
public ClientManagerVM() { _view = new ClientManagerView(); _view.DataContext = this; Load(); LoadCommand = new RelayAsyncCommand(Load); AddCommand = new RelayCommand(Add); EditCommand = new RelayCommand(Edit); DeleteCommand = new RelayCommand(Delete); IsContactSelected = false; OnPropertyChanged("IsContactSelected"); }
/// <summary> /// Initialize all Menu Bar Commands. /// </summary> private void InitializeCommands() { ExitCommand = new RelayCommand(ExitApplication); ExitCommandKey = Key.C; ExitCommandMod = ModifierKeys.Control; ExitCommandLbl = "Ctrl+C"; AboutCommand = new RelayCommand(ShowAboutView); }