C# Class ModernWPF.ViewModels.AsyncPagerViewModel

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

Public Methods

Method Description
AsyncPagerViewModel ( ) : GalaSoft.MvvmLight.Command

Initializes a new instance of the AsyncPagerViewModel class.

AsyncPagerViewModel ( Func pageChangedCallback ) : GalaSoft.MvvmLight.Command

Initializes a new instance of the AsyncPagerViewModel class.

AsyncPagerViewModel ( Func pageChangedCallback, int pageSize ) : GalaSoft.MvvmLight.Command

Initializes a new instance of the AsyncPagerViewModel class.

UpdateStat ( int currentPage, int totalCount ) : void

To be called by consumers when paged data result changes.

Private Methods

Method Description
TryGoToPageAsync ( int page ) : System.Threading.Tasks.Task

Method Details

AsyncPagerViewModel() public method

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

AsyncPagerViewModel() public method

Initializes a new instance of the AsyncPagerViewModel class.
public AsyncPagerViewModel ( Func pageChangedCallback ) : GalaSoft.MvvmLight.Command
pageChangedCallback Func The page changed callback.
return GalaSoft.MvvmLight.Command

AsyncPagerViewModel() public method

Initializes a new instance of the AsyncPagerViewModel class.
public AsyncPagerViewModel ( Func pageChangedCallback, int pageSize ) : GalaSoft.MvvmLight.Command
pageChangedCallback Func 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