C# Class ModernWPF.ViewModels.PagerViewModel

View model for the typical paging logic when given paging size, current page, and total item count.
Inheritance: ViewModelBase
Show file Open project: soukoku/ModernWPF Class Usage Examples

Public Methods

Method Description
PagerViewModel ( ) : GalaSoft.MvvmLight.Command

Initializes a new instance of the PagerViewModel class.

PagerViewModel ( int>.Action pageChangedCallback ) : GalaSoft.MvvmLight.Command

Initializes a new instance of the PagerViewModel class.

PagerViewModel ( int>.Action pageChangedCallback, int pageSize ) : GalaSoft.MvvmLight.Command

Initializes a new instance of the PagerViewModel class.

UpdateStat ( int currentPage, int totalCount ) : void

To be called by consumers when paged data result changes.

Private Methods

Method Description
TryGoToPage ( int page ) : void

Method Details

PagerViewModel() public method

Initializes a new instance of the PagerViewModel class.
public PagerViewModel ( ) : GalaSoft.MvvmLight.Command
return GalaSoft.MvvmLight.Command

PagerViewModel() public method

Initializes a new instance of the PagerViewModel class.
public PagerViewModel ( int>.Action pageChangedCallback ) : GalaSoft.MvvmLight.Command
pageChangedCallback int>.Action The page changed callback.
return GalaSoft.MvvmLight.Command

PagerViewModel() public method

Initializes a new instance of the PagerViewModel class.
public PagerViewModel ( int>.Action pageChangedCallback, int pageSize ) : GalaSoft.MvvmLight.Command
pageChangedCallback int>.Action The page changed callback.
pageSize int Initial size of the page.
return GalaSoft.MvvmLight.Command

UpdateStat() public method

To be called by consumers when paged data result changes.
public UpdateStat ( int currentPage, int totalCount ) : void
currentPage int
totalCount int
return void