Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.Wpf.Controls

#Declaration

public DataTemplate PageTemplate { get; set; }

#Property Value

Type Description
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.

<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