/// <summary> /// Default constructor /// </summary> public TableViewModel() { LoadCommand = new RelayCommand(o => Load()); AddCommand = new RelayCommand(o => Add()); DeleteCommand = new RelayCommand(o => Delete(), IsSelected); //SearchCommand = new RelayCommand(o => Search()); OnClosingCommand = new RelayCommand(o => OnClosing()); SaveCommand = new RelayCommand(o => Save()); EditedCommand = new RelayCommand(o => Edited()); _modified = new List<object>[3]; for (int i = 0; i < _modified.Count(); i++) { _modified[i] = new List<object>(); } }
public SearchViewModel(TableViewModel tableTableviewModel) { _tableviewModel = tableTableviewModel; SearchCommand = new RelayCommand(o => Search(), o => CanSearch()); }