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.1.dll
NuGet Package: DevExpress.Wpf.Controls
Declaration
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