private void Model_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == nameof(Model.MaximumRows) || e.PropertyName == nameof(Model.StartRowIndex) || e.PropertyName == nameof(Model.Count)) { OnPropertyChanged(nameof(CurrentPage)); OnPropertyChanged(nameof(CountOfPages)); OnPropertyChanged(nameof(StringCountOfPages)); FirstCommand.RiseCanExecute(); PreviousCommand.RiseCanExecute(); NextCommand.RiseCanExecute(); LastCommand.RiseCanExecute(); } }