Back to Devexpress

Book.PageTemplate Property

wpf-devexpress-dot-xpf-dot-controls-dot-book-573fcfde.md

latest2.6 KB
Original Source

Book.PageTemplate Property

Gets or sets the template that defines the presentation of pages. This is a dependency property.

Namespace : DevExpress.Xpf.Controls

Assembly : DevExpress.Xpf.Controls.v25.2.dll

NuGet Package : DevExpress.Wpf.Controls

Declaration

csharp
public DataTemplate PageTemplate { get; set; }
vb
Public Property PageTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A DataTemplate object that defines the presentation of pages.

|

Remarks

The Book control doesn’t automatically present data from a bound data source. You should create a template that defines data presentation and page layout, and assign it to the PageTemplate property.

xaml
<dxco:Book.PageTemplate>
    <DataTemplate>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="110"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Text="Company Name: " FontWeight="Bold"/>
            <TextBlock Grid.Column="1" Text="{Binding CompanyName}"/>
            <TextBlock Grid.Row="1" Text="Country: " FontWeight="Bold"/>
            <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Country}"/>
            <TextBlock Grid.Row="2" Text="City: " FontWeight="Bold"/>
            <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding City}"/>
            <TextBlock Grid.Row="3" Text="Unit Price: " FontWeight="Bold"/>
            <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding UnitPrice}"/>
            <TextBlock Grid.Row="4" Text="Quantity: " FontWeight="Bold"/>
            <TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Quantity}"/>
        </Grid>
    </DataTemplate>
</dxco:Book.PageTemplate>

See Also

Book Class

Book Members

DevExpress.Xpf.Controls Namespace