Version

PageIndexChanged Event

This event is raised before the PageIndex of a particular data island has changed.
Syntax
'Declaration
 
Public Event PageIndexChanged As EventHandler(Of PageChangedEventArgs)
public event EventHandler<PageChangedEventArgs> PageIndexChanged
Event Data

The event handler receives an argument of type PageChangedEventArgs containing data related to this event. The following PageChangedEventArgs properties provide information specific to this event.

PropertyDescription
OldPageIndex The PageIndex of the page that was visible.
Example
This sample demonstrates how to handle the PageIndexChanged event which is fired after the page index changes.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

AddHandler Me.MyGrid.PageIndexChanged, AddressOf MyGrid_PageIndexChanged

Private Sub MyGrid_PageIndexChanged(ByVal sender As Object, ByVal e As PageChangedEventArgs)
   System.Diagnostics.Debug.WriteLine("Successfully changed page")
End Sub 'MyGrid_PageIndexChanged
this.MyGrid.PageIndexChanged +=new EventHandler<PageChangedEventArgs>(MyGrid_PageIndexChanged);

private void MyGrid_PageIndexChanged(object sender,PageChangedEventArgs e)
{
   System.Diagnostics.Debug.WriteLine("Successfully changed page");
}
<ig:XamGrid x:Name="MyGrid" 
    
PageIndexChanged="MyGrid_PageIndexChanged">
</ig:XamGrid>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also