/// <summary> /// 更新按钮状态 /// </summary> private void upButtonStatus() { FirstPageCommand.RaiseCanExecuteChanged(); PreviousPageCommand.RaiseCanExecuteChanged(); NextPageCommand.RaiseCanExecuteChanged(); LastPageCommand.RaiseCanExecuteChanged(); }
public PaginatorControlViewModel() { NextPCommand = new NextPageCommand(this); PreviusPCommand = new PreviusPageCommand(this); LastPCommand = new LastPageCommand(this); FirstPCommand = new FirstPageCommand(this); }
public PaginationViewModel() { CurrentPageIndex = 0; NextCommand = new NextPageCommand(this); PreviousCommand = new PreviousPageCommand(this); FirstCommand = new FirstPageCommand(this); LastCommand = new LastPageCommand(this); }
public bool Equals(LastPageCommand other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.display, display) && Equals(other.browsable, browsable); }
private void InitiateCommands() { _firstPageCommand = new FirstPageCommand(); _firstPageCommand.FirstPage += _FirstPage; _previousPageCommand = new PreviousPageCommand(); _previousPageCommand.PreviousPage += _PreviousPage; _nextPageCommand = new NextPageCommand(); _nextPageCommand.NextPage += _NextPage; _lastPageCommand = new LastPageCommand(); _lastPageCommand.LastPage += _LastPage; }
public MainViewModel() { populateList(); ViewList = new CollectionViewSource(); ViewList.Source = PeopleList; ViewList.Filter += new FilterEventHandler(view_Filter); CurrentPageIndex = 0; itemcount = peopleList.Count; CalculateTotalPages(); NextCommand = new NextPageCommand(this); PreviousCommand = new PreviousPageCommand(this); FirstCommand = new FirstPageCommand(this); LastCommand = new LastPageCommand(this); }