BookPageTemplateSelector Class
Provides a way to choose a DataTemplate for BookPage based various properties.
public class BookPageTemplateSelector : DataTemplateSelector
- Inheritance:
- Object DataTemplateSelector Object
Constructors
BookPageTemplateSelector()
public BookPageTemplateSelector()
Properties
BackFacingPageTemplate
Gets or sets a DataTemplate used to present the content of all back-facing pages.
public DataTemplate BackFacingPageTemplate { get; set; }
Property Value
- DataTemplate:
A 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 DataTemplate used to present the content of the first page.
public DataTemplate FirstPageTemplate { get; set; }
Property Value
- DataTemplate:
A DataTemplate used to present the content of the first page.
FrontFacingPageTemplate
Gets or sets a DataTemplate used to present the content of all front-facing pages.
public DataTemplate FrontFacingPageTemplate { get; set; }
Property Value
- DataTemplate:
A 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 DataTemplate used to present the content of the last page.
public DataTemplate LastPageTemplate { get; set; }
Property Value
- DataTemplate:
A 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 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; otherwise null.