DashboardControlBase.PrintPreviewOptionsTemplate Property

Allows you to specify a custom Print Preview Options dialog template.

Namespace: DevExpress.DashboardWpf

Assembly: DevExpress.Xpf.Dashboard.v18.2.dll

Declaration

public DataTemplate PrintPreviewOptionsTemplate { get; set; }
Public Property PrintPreviewOptionsTemplate As DataTemplate

Property Value

Type Description
DataTemplate

A object that specifies the data template used to render the Print Preview Options dialog.

Remarks

The following Xaml snippet illustrates how to display the Print Preview Options dialog using a custom template. The template is shown when the end-user clicks the Options button in the Print Preview window. The PropertyGridControl is used to display and edit options.

xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxdash="http://schemas.devexpress.com/winfx/2008/xaml/dashboard"
xmlns:dxprg="http://schemas.devexpress.com/winfx/2008/xaml/propertygrid"
<!-- -->
<Grid>
    <dxdash:DashboardControl>
        <dxdash:DashboardControlBase.PrintPreviewOptionsTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <TextBlock
                        Grid.ColumnSpan="2"
                        Margin="0,5,0,0"
                        FontSize="16"
                        Text="{Binding Caption}" />
                    <dxprg:PropertyGridControl
                        Grid.Row="1"
                        Grid.ColumnSpan="2"
                        Margin="0,30,0,30"
                        SelectedObject="{Binding Properties}"
                        ShowCategories="Hidden"
                        ShowSearchBox="False"
                        ShowToolPanel="False" />
                    <StackPanel Grid.Row="2" Orientation="Horizontal">
                        <Button
                            MinWidth="100"
                            Command="{Binding ResetCommand}"
                            Content="Reset" />
                        <Button
                            MinWidth="100"
                            Margin="10,0,0,0"
                            HorizontalAlignment="Center"
                            Command="{Binding ApplyCommand}"
                            Content="Submit" />
                        <Button
                            MinWidth="100"
                            Margin="10,0,0,0"
                            Command="{Binding CancelCommand}"
                            Content="Cancel" />
                    </StackPanel>
                </Grid>
            </DataTemplate>
        </dxdash:DashboardControlBase.PrintPreviewOptionsTemplate>
    </dxdash:DashboardControl>
</Grid>
See Also