RadBook
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:
[TelerikToolboxCategory("Containers")]
[Themable]
public class RadBook : ItemsControl
Inheritance: objectRadBook
Constructors
Fields
FirstPagePositionProperty
DependencyProperty
DependencyProperty for the FirstPagePosition property.
public static readonly DependencyProperty FirstPagePositionProperty
FlipDurationProperty
DependencyProperty
DependencyProperty for the FlipDuration property.
public static readonly DependencyProperty FlipDurationProperty
FoldActivatedEvent
RoutedEvent
RoutedEvent for the FoldActivated event.
public static readonly RoutedEvent FoldActivatedEvent
FoldDeactivatedEvent
RoutedEvent
RoutedEvent for the FoldDeactivated event.
public static readonly RoutedEvent FoldDeactivatedEvent
FoldHintPositionProperty
DependencyProperty
DependencyProperty for the DefaultActiveFoldPosition property.
public static readonly DependencyProperty FoldHintPositionProperty
FoldSizeProperty
DependencyProperty
DependencyProperty for the FoldSize property.
public static readonly DependencyProperty FoldSizeProperty
HardPagesProperty
DependencyProperty
Identifies the HardPages dependency property.
public static readonly DependencyProperty HardPagesProperty
IsKeyboardNavigationEnabledProperty
DependencyProperty
DependencyProperty for the IsKeyboardNavigationEnabled property.
public static readonly DependencyProperty IsKeyboardNavigationEnabledProperty
IsVirtualizingProperty
DependencyProperty
Identifies the IsVirtualizing dependency property. This property tells RadBook whether to reuse its item containers or not.
public static readonly DependencyProperty IsVirtualizingProperty
LeftPageTemplateProperty
DependencyProperty
DependencyProperty for the LeftPageTemplate property.
public static readonly DependencyProperty LeftPageTemplateProperty
LeftPageTemplateSelectorProperty
DependencyProperty
DependencyProperty for the LeftPageTemplateSelector property.
public static readonly DependencyProperty LeftPageTemplateSelectorProperty
PageChangedEvent
RoutedEvent
RoutedEvent for the PageChanged event.
public static readonly RoutedEvent PageChangedEvent
PageFlipEndedEvent
RoutedEvent
RoutedEvent for the PageFlipEnded event.
public static readonly RoutedEvent PageFlipEndedEvent
PageFlipModeProperty
DependencyProperty
DependencyProperty for the PageFlipMode property.
public static readonly DependencyProperty PageFlipModeProperty
PageFlipStartedEvent
RoutedEvent
RoutedEvent for the PreviewPageFlipStarted event.
public static readonly RoutedEvent PageFlipStartedEvent
PreviewPageFlipStartedEvent
RoutedEvent
RoutedEvent for the PreviewPageFlipStarted event.
public static readonly RoutedEvent PreviewPageFlipStartedEvent
RightPageIndexProperty
DependencyProperty
DependencyProperty for the RightPageIndex property.
public static readonly DependencyProperty RightPageIndexProperty
RightPageTemplateProperty
DependencyProperty
DependencyProperty for the RightPageTemplate property.
public static readonly DependencyProperty RightPageTemplateProperty
RightPageTemplateSelectorProperty
DependencyProperty
DependencyProperty for theRightPageTemplateSelector property.
public static readonly DependencyProperty RightPageTemplateSelectorProperty
ShowPageFoldProperty
DependencyProperty
DependencyProperty for the ShowPageFold property.
public static readonly DependencyProperty ShowPageFoldProperty
Properties
Gets or sets the position the first page - left or right, with respect to the book.
public PagePosition FirstPagePosition { get; set; }
Gets or sets the amount of time necessary to flip a page.
public TimeSpan FlipDuration { get; set; }
Gets or sets the starting fold when turning the page programmatically or when ShowPageFold is set to OnPageEnter.
public FoldHintPosition FoldHintPosition { get; set; }
FoldSize
Size
Gets or sets the size of the page fold.
public Size FoldSize { get; set; }
Gets or sets whether the keyboard can be used to navigate through the pages of the book.
public bool IsKeyboardNavigationEnabled { get; set; }
Gets or sets the IsVirtualizing property. This property tells RadBook whether to reuse its item containers or not.
public bool IsVirtualizing { get; set; }
LeftPageTemplate
DataTemplate
Gets or sets the template for a left page.
public DataTemplate LeftPageTemplate { get; set; }
The left page template.
LeftPageTemplateSelector
DataTemplateSelector
Gets or sets the left page template selector.
public DataTemplateSelector LeftPageTemplateSelector { get; set; }
Gets or sets the paged items.
public IPagedCollectionView PagedItems { get; set; }
The paged items.
Gets or sets the fashion (None, SingleClick or DoubleClick) in which the pages turn.
public PageFlipMode PageFlipMode { get; set; }
Gets or sets the index of the right page in the book.
public int RightPageIndex { get; set; }
RightPageTemplate
DataTemplate
Gets or sets the template for a right page.
public DataTemplate RightPageTemplate { get; set; }
The right page template.
RightPageTemplateSelector
DataTemplateSelector
Gets or sets the right page template selector.
public DataTemplateSelector RightPageTemplateSelector { get; set; }
Gets or sets whether and when a fold will be displayed.
public PageFoldVisibility ShowPageFold { get; set; }
Methods
Override for ClearContainerForItem.
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Converts a page index to a sheet index.
public static int ConvertPageToSheetIndex(int rightPageIndex, PagePosition firstPagePosition)
The RightPageIndex of the book.
firstPagePositionPagePositionThe position of the first page in the book.
Returns:Converts the index of the sheet to page.
public static int ConvertSheetToPageIndex(int sheetIndex, PagePosition fistPagePosition, int totalItemsCount)
Index of the sheet.
fistPagePositionPagePositionThe fist page position of the book.
totalItemsCountintThe total number of items in the book.
Returns:Navigates to the first page.
public void FirstPage()
GetContainerForItemOverride()
DependencyObject
Creates or identifies the element that is used to display the given item.
protected override DependencyObject GetContainerForItemOverride()
DependencyObject
The element that is used to display the given item.
Navigates to the last page.
public void LastPage()
Navigates to the next page.
public void NextPage()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific AutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific AutomationPeer implementation.
Raises the event.
protected virtual void OnFoldActivated(FoldEventArgs e)
The FoldEventArgs instance containing the event data.
Raises the event.
protected virtual void OnFoldDeactivated(FoldEventArgs e)
The FoldEventArgs instance containing the event data.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when the value of the property changes.
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
A NotifyCollectionChangedEventArgs that contains the event data.
Called before the event occurs.
protected override void OnKeyDown(KeyEventArgs e)
The data for the event.
Called when a page is changed. Raises PageChanged event.
Called when a page flips. Raises PageFlipped event.
Raises the event.
protected virtual void OnPageFlipStarted(PageFlipEventArgs e)
The PageFlipEventArgs instance containing the event data.
Raises the event.
protected virtual void OnPreviewPageFlipStarted(PageFlipEventArgs e)
The PageFlipEventArgs instance containing the event data.
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Element used to display the specified item.
itemobjectSpecified item.
Navigates to the previous page.
public void PreviousPage()
Resets the theme.
public void ResetTheme()
Events
Occurs when mouse enters any of the four corners of the book.
public event EventHandler<FoldEventArgs> FoldActivated
Occurs when mouse leaves any of the four corners of the book.
public event EventHandler<FoldEventArgs> FoldDeactivated
Occurs when a full page flip occurs.
public event RadRoutedEventHandler PageChanged
Occurs when page has finished dragging.
public event EventHandler<PageFlipEventArgs> PageFlipEnded
Occurs when page is dragged.
public event EventHandler<PageFlipEventArgs> PageFlipStarted
Occurs when page is about to get dragged.
public event EventHandler<PageFlipEventArgs> PreviewPageFlipStarted