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