DataPager.PageIndex Property


Gets or sets the index of the current page.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)

public int PageIndex { get; set; }
<sdk:DataPager PageIndex="int"/>

Property Value

Type: System.Int32
The index of the current page if the source is an IPagedCollectionView; otherwise, 0. The default is -1.


Source is null or PageSize is 0, and PageIndex is not -1.


Source is not null or PageSize is not 0, and PageIndex is less than 0.

Dependency property identifier field: PageIndexProperty

If Source is null, or if PageSize is 0, PageIndex must be -1. Otherwise, PageIndex must be greater than or equal to 0.

The source typically implements the IPagedCollectionView interface. In this case, PageIndex gets or sets the current IPagedCollectionView.PageIndex of the IPagedCollectionView.

If the source is a collection that implements IEnumerable<T> but not IPagedCollectionView, PageIndex returns 0.


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.