DocumentPreview.Model Property
Specifies the model for the document's Print Preview.
Namespace: DevExpress.Xpf.Printing
Assembly: DevExpress.Xpf.Printing.v14.2.dll
#Declaration
#Property Value
Type | Description |
---|---|
IDocument |
An object implementing the IDocument |
#Remarks
To show a document's print preview, assign a LinkPreviewModel or DevExpress.Xpf.Printing.ReportPreviewModel object to the Model property.
For more information, see Document Viewer.
#Examples
This sample demonstrates how you can quickly show a report's Print Preview.
To do this, drop a DocumentPreview onto a Web page, enable its DocumentPreview.AutoCreateDocument property and assign a DevExpress.Xpf.Printing.ReportPreviewModel to its DocumentPreview.Model property.
Then, define the ReportServicePreviewModel.ServiceUri and ReportServicePreviewModel.ReportName properties.
<dxp:DocumentPreview Name="documentPreview1" AutoCreateDocument="True">
<dxp:DocumentPreview.Model>
<dxp:ReportPreviewModel ServiceUri="../ReportService1.svc"
ReportName="SilverlightApplication1.Web.XtraReport1" />
</dxp:DocumentPreview.Model>
</dxp:DocumentPreview>