In This Article

BookPageTemplateSelector Class

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

public class BookPageTemplateSelector : DataTemplateSelector
Inheritance:
System.Object System.Windows.Controls.DataTemplateSelector Object

Constructors

BookPageTemplateSelector()

public BookPageTemplateSelector()

Properties

BackFacingPageTemplate

Gets or sets a System.Windows.DataTemplate used to present the content of all back-facing pages.

public DataTemplate BackFacingPageTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

A System.Windows.Style used to present the content of all back-facing pages.

Remarks

The FirstPageTemplate and LastPageTemplate properties take precedence over this property.

FirstPageTemplate

Gets or sets a System.Windows.DataTemplate used to present the content of the first page.

public DataTemplate FirstPageTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

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

FrontFacingPageTemplate

Gets or sets a System.Windows.DataTemplate used to present the content of all front-facing pages.

public DataTemplate FrontFacingPageTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

A System.Windows.Style used to present the content of all front-facing pages.

Remarks

The FirstPageTemplate and LastPageTemplate properties take precedence over this property.

LastPageTemplate

Gets or sets a System.Windows.DataTemplate used to present the content of the last page.

public DataTemplate LastPageTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

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

Remarks

The FirstPageTemplate property take precedence over this property.

Methods

SelectTemplate(Object, DependencyObject)

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

public override DataTemplate SelectTemplate(object item, DependencyObject container)
Parameter Type Description
item System.Object

The data object for which to select the template.

container System.Windows.DependencyObject

The data-bound object.

Returns

System.Windows.DataTemplate:

Returns a System.Windows.DataTemplate; otherwise null.

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()