New to Telerik UI for WPFStart a free 30-day trial

RadBook

Class

Represents a book-like control that displays its items as pages, allowing users to navigate through them in a realistic manner. The control supports various features including customizable page templates, page flipping animations, virtualizing item containers, and event handling for page turn actions. It includes properties for managing the visual presentation of pages, like fold hints, page dimensions, keyboard navigation, and more. This control is part of the Telerik UI for WPF and is designed to create an interactive reading experience within an application.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
[TelerikToolboxCategory("Containers")]
[Themable]
public class RadBook : ItemsControl

Inheritance: objectRadBook

Constructors

Initializes a new instance of the RadBook class.

C#
public RadBook()

Fields

FirstPagePositionProperty

DependencyProperty

DependencyProperty for the FirstPagePosition property.

C#
public static readonly DependencyProperty FirstPagePositionProperty

FlipDurationProperty

DependencyProperty

DependencyProperty for the FlipDuration property.

C#
public static readonly DependencyProperty FlipDurationProperty

RoutedEvent for the FoldActivated event.

C#
public static readonly RoutedEvent FoldActivatedEvent

RoutedEvent for the FoldDeactivated event.

C#
public static readonly RoutedEvent FoldDeactivatedEvent

FoldHintPositionProperty

DependencyProperty

DependencyProperty for the DefaultActiveFoldPosition property.

C#
public static readonly DependencyProperty FoldHintPositionProperty

FoldSizeProperty

DependencyProperty

DependencyProperty for the FoldSize property.

C#
public static readonly DependencyProperty FoldSizeProperty

HardPagesProperty

DependencyProperty

Identifies the HardPages dependency property.

C#
public static readonly DependencyProperty HardPagesProperty

DependencyProperty for the IsKeyboardNavigationEnabled property.

C#
public static readonly DependencyProperty IsKeyboardNavigationEnabledProperty

IsVirtualizingProperty

DependencyProperty

Identifies the IsVirtualizing dependency property. This property tells RadBook whether to reuse its item containers or not.

C#
public static readonly DependencyProperty IsVirtualizingProperty

LeftPageTemplateProperty

DependencyProperty

DependencyProperty for the LeftPageTemplate property.

C#
public static readonly DependencyProperty LeftPageTemplateProperty

DependencyProperty for the LeftPageTemplateSelector property.

C#
public static readonly DependencyProperty LeftPageTemplateSelectorProperty

PageChangedEvent

RoutedEvent

RoutedEvent for the PageChanged event.

C#
public static readonly RoutedEvent PageChangedEvent

RoutedEvent for the PageFlipEnded event.

C#
public static readonly RoutedEvent PageFlipEndedEvent

PageFlipModeProperty

DependencyProperty

DependencyProperty for the PageFlipMode property.

C#
public static readonly DependencyProperty PageFlipModeProperty

RoutedEvent for the PreviewPageFlipStarted event.

C#
public static readonly RoutedEvent PageFlipStartedEvent

RoutedEvent for the PreviewPageFlipStarted event.

C#
public static readonly RoutedEvent PreviewPageFlipStartedEvent

RightPageIndexProperty

DependencyProperty

DependencyProperty for the RightPageIndex property.

C#
public static readonly DependencyProperty RightPageIndexProperty

RightPageTemplateProperty

DependencyProperty

DependencyProperty for the RightPageTemplate property.

C#
public static readonly DependencyProperty RightPageTemplateProperty

DependencyProperty for theRightPageTemplateSelector property.

C#
public static readonly DependencyProperty RightPageTemplateSelectorProperty

ShowPageFoldProperty

DependencyProperty

DependencyProperty for the ShowPageFold property.

C#
public static readonly DependencyProperty ShowPageFoldProperty

Properties

Gets or sets the position the first page - left or right, with respect to the book.

C#
public PagePosition FirstPagePosition { get; set; }

Gets or sets the amount of time necessary to flip a page.

C#
public TimeSpan FlipDuration { get; set; }

Gets or sets the starting fold when turning the page programmatically or when ShowPageFold is set to OnPageEnter.

C#
public FoldHintPosition FoldHintPosition { get; set; }

Gets or sets the size of the page fold.

C#
public Size FoldSize { get; set; }

Gets or sets the HardPages property.

C#
public HardPages HardPages { get; set; }

Gets or sets whether the keyboard can be used to navigate through the pages of the book.

C#
public bool IsKeyboardNavigationEnabled { get; set; }

Gets or sets the IsVirtualizing property. This property tells RadBook whether to reuse its item containers or not.

C#
public bool IsVirtualizing { get; set; }

LeftPageTemplate

DataTemplate

Gets or sets the template for a left page.

C#
public DataTemplate LeftPageTemplate { get; set; }
Property Value:

The left page template.

LeftPageTemplateSelector

DataTemplateSelector

Gets or sets the left page template selector.

C#
public DataTemplateSelector LeftPageTemplateSelector { get; set; }

Gets or sets the paged items.

C#
public IPagedCollectionView PagedItems { get; set; }
Property Value:

The paged items.

Gets or sets the fashion (None, SingleClick or DoubleClick) in which the pages turn.

C#
public PageFlipMode PageFlipMode { get; set; }

Gets or sets the index of the right page in the book.

C#
public int RightPageIndex { get; set; }

RightPageTemplate

DataTemplate

Gets or sets the template for a right page.

C#
public DataTemplate RightPageTemplate { get; set; }
Property Value:

The right page template.

RightPageTemplateSelector

DataTemplateSelector

Gets or sets the right page template selector.

C#
public DataTemplateSelector RightPageTemplateSelector { get; set; }

Gets or sets whether and when a fold will be displayed.

C#
public PageFoldVisibility ShowPageFold { get; set; }

Methods

Override for ClearContainerForItem.

C#
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObjectitemobject

Converts a page index to a sheet index.

C#
public static int ConvertPageToSheetIndex(int rightPageIndex, PagePosition firstPagePosition)
Parameters:rightPageIndexint

The RightPageIndex of the book.

firstPagePositionPagePosition

The position of the first page in the book.

Returns:

int

Converts the index of the sheet to page.

C#
public static int ConvertSheetToPageIndex(int sheetIndex, PagePosition fistPagePosition, int totalItemsCount)
Parameters:sheetIndexint

Index of the sheet.

fistPagePositionPagePosition

The fist page position of the book.

totalItemsCountint

The total number of items in the book.

Returns:

int

Navigates to the first page.

C#
public void FirstPage()

Creates or identifies the element that is used to display the given item.

C#
protected override DependencyObject GetContainerForItemOverride()
Returns:

DependencyObject

The element that is used to display the given item.

Determines if the specified item is (or is eligible to be) its own container.

C#
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters:itemobjectReturns:

bool

Navigates to the last page.

C#
public void LastPage()

Navigates to the next page.

C#
public void NextPage()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

C#
public override void OnApplyTemplate()

Returns class-specific AutomationPeer.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

The type-specific AutomationPeer implementation.

Raises the event.

C#
protected virtual void OnFoldActivated(FoldEventArgs e)
Parameters:eFoldEventArgs

The FoldEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnFoldDeactivated(FoldEventArgs e)
Parameters:eFoldEventArgs

The FoldEventArgs instance containing the event data.

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Called when the value of the property changes.

C#
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

A NotifyCollectionChangedEventArgs that contains the event data.

Called before the event occurs.

C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The data for the event.

Called when a page is changed. Raises PageChanged event.

C#
protected virtual void OnPageChanged(RadRoutedEventArgs e)
Parameters:eRadRoutedEventArgs

Called when a page flips. Raises PageFlipped event.

C#
protected virtual void OnPageFlipEnded(PageFlipEventArgs e)
Parameters:ePageFlipEventArgs

Raises the event.

C#
protected virtual void OnPageFlipStarted(PageFlipEventArgs e)
Parameters:ePageFlipEventArgs

The PageFlipEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnPreviewPageFlipStarted(PageFlipEventArgs e)
Parameters:ePageFlipEventArgs

The PageFlipEventArgs instance containing the event data.

Prepares the specified element to display the specified item.

C#
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Navigates to the previous page.

C#
public void PreviousPage()

Resets the theme.

C#
public void ResetTheme()

Events

Occurs when mouse enters any of the four corners of the book.

C#
public event EventHandler<FoldEventArgs> FoldActivated

Occurs when mouse leaves any of the four corners of the book.

C#
public event EventHandler<FoldEventArgs> FoldDeactivated

Occurs when a full page flip occurs.

C#
public event RadRoutedEventHandler PageChanged

Occurs when page has finished dragging.

C#
public event EventHandler<PageFlipEventArgs> PageFlipEnded

Occurs when page is dragged.

C#
public event EventHandler<PageFlipEventArgs> PageFlipStarted

Occurs when page is about to get dragged.

C#
public event EventHandler<PageFlipEventArgs> PreviewPageFlipStarted
In this article
DefinitionConstructorsRadBook()FieldsFirstPagePositionPropertyFlipDurationPropertyFoldActivatedEventFoldDeactivatedEventFoldHintPositionPropertyFoldSizePropertyHardPagesPropertyIsKeyboardNavigationEnabledPropertyIsVirtualizingPropertyLeftPageTemplatePropertyLeftPageTemplateSelectorPropertyPageChangedEventPageFlipEndedEventPageFlipModePropertyPageFlipStartedEventPreviewPageFlipStartedEventRightPageIndexPropertyRightPageTemplatePropertyRightPageTemplateSelectorPropertyShowPageFoldPropertyPropertiesFirstPagePositionFlipDurationFoldHintPositionFoldSizeHardPagesIsKeyboardNavigationEnabledIsVirtualizingLeftPageTemplateLeftPageTemplateSelectorPagedItemsPageFlipModeRightPageIndexRightPageTemplateRightPageTemplateSelectorShowPageFoldMethodsClearContainerForItemOverride(DependencyObject, object)ConvertPageToSheetIndex(int, PagePosition)ConvertSheetToPageIndex(int, PagePosition, int)FirstPage()GetContainerForItemOverride()IsItemItsOwnContainerOverride(object)LastPage()NextPage()OnApplyTemplate()OnCreateAutomationPeer()OnFoldActivated(FoldEventArgs)OnFoldDeactivated(FoldEventArgs)OnInitialized(EventArgs)OnItemsChanged(NotifyCollectionChangedEventArgs)OnKeyDown(KeyEventArgs)OnPageChanged(RadRoutedEventArgs)OnPageFlipEnded(PageFlipEventArgs)OnPageFlipStarted(PageFlipEventArgs)OnPreviewPageFlipStarted(PageFlipEventArgs)PrepareContainerForItemOverride(DependencyObject, object)PreviousPage()ResetTheme()EventsFoldActivatedFoldDeactivatedPageChangedPageFlipEndedPageFlipStartedPreviewPageFlipStarted
Not finding the help you need?
Contact Support