Book.PageIndexChanging Event
In This Article
Enables cancelling turning the current page.
Namespace: DevExpress.Xpf.Controls
Assembly: DevExpress.Xpf.Controls.v14.2.dll
#Declaration
#Event Data
The PageIndexChanging event's handler receives an argument of the PageIndexChangingEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel |
Gets or sets a value indicating whether the event should be canceled.
Inherited from Cancel |
New |
Gets or sets the index of a current page. |
Old |
Gets the index of the previous page. |
#Remarks
The PageIndexChanging event is raised before a new page is about to be opened. This occurs when an end-user turns the page, or the page is opened in code using the Book.PageIndex property.
The PageIndexChanging event can be handled to do the following:
- Cancel the operation by setting the event parameter's Cancel property to true.
- Implement custom navigation. Use the PageIndexChangingEventArgs.NewPageIndex property to open the required page. The index of the previously opened page is returned by the PageIndexChangingEventArgs.OldPageIndex property.
After a new page has been opened, the Book.PageIndexChanged event is fired.
See Also