In This Article

BookPanel Class

Represents a Panel used to display pages in a Book control.

public class BookPanel : VirtualizingPanel, IOrientedElement
Inheritance:
object Visual UIElement FrameworkElement Panel VirtualizingPanel object
Implements:
IOrientedElement

Constructors

BookPanel()

Initializes an instance of the class.

public BookPanel()

Properties

IsFirstPageFront

Indicates whether the first page displayed by the book panel is front facing.

public bool IsFirstPageFront { get; set; }

Property Value

bool:

true if the first page displayed by the book panel is front facing; otherwise, false. The default value is false.

Orientation

The orientation of the panel.

public Orientation Orientation { get; set; }

Property Value

Orientation

PageDepth

The number of pages measured and arranged on the back and front sides of the book panel.

public int PageDepth { get; set; }

Property Value

int:

The default value is 1.

PendingViewIndex

The index of the pending selected view.

public int? PendingViewIndex { get; set; }

Property Value

int?:

The default value is null.

SelectedViewIndex

The index of the selected view.

public int SelectedViewIndex { get; set; }

Property Value

int:

The default value is 0.

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnItemsChanged(object, ItemsChangedEventArgs)

Called when the Items collection that is associated with the ItemsControl for this Panel changes.

protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
Parameter Type Description
sender object

The object that raised the event.

args ItemsChangedEventArgs

Provides data for the ItemsChanged event.

Fields

IsFirstPageFrontProperty

Defines the IsFirstPageFront property.

public static readonly DependencyProperty IsFirstPageFrontProperty

OrientationProperty

Defines the Orientation property.

public static readonly DependencyProperty OrientationProperty

PageDepthProperty

Defines the PageDepth property.

public static readonly DependencyProperty PageDepthProperty

PendingViewIndexProperty

Defines the PendingViewIndex property.

public static readonly DependencyProperty PendingViewIndexProperty

SelectedViewIndexProperty

Defines the SelectedViewIndex property.

public static readonly DependencyProperty SelectedViewIndexProperty

Extension Methods