Back to Devexpress

PdfViewerControl.PrintPreviewDialogTemplate Property

wpf-devexpress-dot-xpf-dot-pdfviewer-dot-pdfviewercontrol-7b2d0453.md

latest2.7 KB
Original Source

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

NuGet Package : DevExpress.Wpf.PdfViewer

Declaration

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

Property Value

TypeDescription
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.

xaml
<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

PrintDocumentCommand

PdfViewerControl Class

PdfViewerControl Members

DevExpress.Xpf.PdfViewer Namespace