In This Article

BookPageTemplateSelector Class

Provides a way to choose a DataTemplate for BookPage based various properties.

public class BookPageTemplateSelector : DataTemplateSelector
Inheritance:
object DataTemplateSelector object

Constructors

BookPageTemplateSelector()

Initializes an instance of the class.

public BookPageTemplateSelector()

Properties

BackFacingPageTemplate

A DataTemplate used to present the content of all back-facing pages.

public DataTemplate? BackFacingPageTemplate { get; set; }

Property Value

DataTemplate

Remarks

The FirstPageTemplate and LastPageTemplate properties take precedence over this property.

FirstPageTemplate

A DataTemplate used to present the content of the first page.

public DataTemplate? FirstPageTemplate { get; set; }

Property Value

DataTemplate

FrontFacingPageTemplate

A DataTemplate used to present the content of all front-facing pages.

public DataTemplate? FrontFacingPageTemplate { get; set; }

Property Value

DataTemplate

Remarks

The FirstPageTemplate and LastPageTemplate properties take precedence over this property.

LastPageTemplate

A DataTemplate used to present the content of the last page.

public DataTemplate? LastPageTemplate { get; set; }

Property Value

DataTemplate

Remarks

The FirstPageTemplate property take precedence over this property.

Methods

SelectTemplate(object, DependencyObject)

When overridden in a derived class, returns a DataTemplate based on custom logic.

public override DataTemplate? SelectTemplate(object item, DependencyObject container)
Parameter Type Description
item object

The data object for which to select the template.

container DependencyObject

The data-bound object.

Returns

DataTemplate:

Returns a DataTemplate or null. The default value is null.

Inherited Members

Extension Methods