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

PdfViewerControl.PrintPreviewDialogTemplate Property

Gets or sets the template that defines the visual representation of the print preview dialog. This is a dependency property.

Namespace: DevExpress.Xpf.PdfViewer

Assembly: DevExpress.Xpf.PdfViewer.v24.2.dll

NuGet Package: DevExpress.Wpf.PdfViewer

#Declaration

public DataTemplate PrintPreviewDialogTemplate { get; set; }

#Property Value

Type Description
DataTemplate

A DataTemplate template that defines the visual representation of the print preview dialog.

#Remarks

The PrintPreviewDialogTemplate template should contain a System.Windows.Controls.ContentControl (or a System.Windows.Controls.ContentPresenter) which Content is set to a DialogService.

See the example below.

<dxpdf:PdfViewerControl.PrintPreviewDialogTemplate>
    <DataTemplate>
        <ContentControl>
            <ContentControl.Content>
                <dx:DialogService>
                    <dx:DialogService.DialogStyle>
                        <Style TargetType="dx:DXDialogWindow">
                            <Setter Property="Width" Value="200"/>
                            <Setter Property="Height" Value="300"/>
                        </Style>
                    </dx:DialogService.DialogStyle>
                    <dx:DialogService.ViewTemplate>
                        <DataTemplate>
                            <Label Content="Custom content"/>
                        </DataTemplate>
                    </dx:DialogService.ViewTemplate>
                </dx:DialogService>
            </ContentControl.Content>
        </ContentControl>
    </DataTemplate>
</dxpdf:PdfViewerControl.PrintPreviewDialogTemplate>
See Also