Код: Выделить всё
public int CurrentPage {
get { return _currentPage; }
set { if (_currentPage != value) { _currentPage = value; OnPropertyChanged(nameof(CurrentPage)); } }}
Код: Выделить всё
public VectorSearchViewModel(VectorSearchStore store) {
_store = store;
_currentPage = 1;
Words = new ObservableCollection();
SearchCommand = new LoadWordsCommand(this, _store);
PreviousPageCommand = new PreviousPageCommand(this, _store);
NextPageCommand = new NextPageCommand(this, _store);
_store.WordsLoaded += OnWordsLoaded;}
private void OnWordsLoaded(){
_words.Clear();
foreach (var word in _store.PagedWords.Data)
{
AddWord(word);
}
_currentPage = _store.PagedWords.CurrentPage;
_totalPages = _store.PagedWords.TotalPages;
_totalRecords = _store.PagedWords.TotalRecords;}
Код: Выделить всё
Подробнее здесь: https://stackoverflow.com/questions/793 ... ding-issue
Мобильная версия