Skip to main content
A newer version of this page is available. .

Book Class

Represents a book control.

Namespace: DevExpress.Xpf.Controls

Assembly: DevExpress.Xpf.Controls.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Controls, DevExpress.Wpf.Navigation

Declaration

public class Book :
    Control,
    IServiceContainer,
    IServiceProvider

Remarks

The Book control allows you to present data as a book. To assign a data source, use the Book.DataSource property. The Book can be bound to any object that implements the IEnumerable interface or its descendant (e.g. IList, ICollection).

Book_Animation

The total number of pages is returned by the Book.PageCount property. The currently opened page is specified by its index using the Book.PageIndex property. When switching to a new page, the Book.PageIndexChanging event is raised, allowing you to cancel the action or implement custom page navigation. After the active page has been changed, the Book.PageIndexChanged event is fired.

The first page can be displayed on the left or right side of the book (in the second instance, the cover is displayed on the left side). To specify where the first page should be displayed, use the Book.FirstPage property.

Use the Book.PageTemplate property to specify a template that presents pages in a book.

Page Animation

There are two types of animation.

  • Page Animation is played when an entire page is being turned over. Its speed is specified by the Book.AnimationSpeed property.

    Book_Animation

  • Short Animation - a page’s corner is turned down. When an end-user hovers the mouse pointer over the active area, a page’s corner is automatically turned up, indicating that this page can be turned. If the mouse pointer leaves the page’s active area, the page’s corner is turned down. At this moment, the short animation is played. Its speed is specified by the Book.ShortAnimationSpeed property. To change the active area’s size, use the Book.ActiveAreaSize property.

    Book_ShortAnimation

The animation rate is specified by the Book.AnimationRate property.

See Also