Created
August 3, 2021 07:22
-
-
Save jasondown/705885f757dbb09e4af2460b72472346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool _canPageNext; | |
/// <summary> | |
/// Gets or sets a value indicating whether move to the next page. | |
/// </summary> | |
/// <value> | |
/// <c>true</c> if you can move to the next page; otherwise, <c>false</c>. | |
/// </value> | |
public bool CanPageNext | |
{ | |
get { return _canPageNext; } | |
set | |
{ | |
if (_canPageNext != value) | |
{ | |
_canPageNext = value; | |
OnPropertyChanged(); | |
} | |
} | |
} | |
private ICommand _pageNextCommand; | |
/// <summary> | |
/// Gets the page next command. | |
/// </summary> | |
/// <value> | |
/// The page next command. | |
/// </value> | |
public ICommand PageNextCommand | |
{ | |
get | |
{ | |
return _pageNextCommand ?? | |
(_pageNextCommand = new RelayCommand(PageNext, () => CanPageNext)); | |
} | |
} | |
private void PageNext() | |
{ | |
CurrentPage++; | |
PageableImages.Reset(GetImages()); | |
CanPageNext = _images.Count > (CurrentPage + 1)*PageSize; | |
CanPagePrevious = true; | |
OnPropertyChanged("PageableImages"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment