MindFusion.Wpf Pack Programmer's Guide
FixedDocumentRenderTarget Class
Remarks See Also
 





An implementation of the IRenderTarget which operates on a FixedDocument object.

Namespace: MindFusion.Reporting.Wpf
Assembly: MindFusion.Reporting.Wpf

 Syntax

C#  Copy Code

public class FixedDocumentRenderTarget : IRenderTarget

Visual Basic  Copy Code

Public Class FixedDocumentRenderTarget
    Implements IRenderTarget

 Remarks

You can pass an instance of this class to the RenderPage method of a ReportLayout in order to render the page as a WPF FixedDocument. The document itself can be obtained through the Document property.

 Example

The following example uses a FixedDocumentRenderTarget object to render all pages of a report to a WPF FixedDocument. The document is then displayed in a WPF DocumentViewer. The example assumes that layout and viewer are variables identifying an existing ReportLayout and DocumentViewer respectively. To obtain a ReportLayout object for a report, call its Layout method after it has been run.

C#  Copy Code

FixedDocumentRenderTarget renderTarget = new FixedDocumentRenderTarget();
for (int i = 0; i < layout.PageCount; i++)
    layout.RenderPage(i, renderTarget);

viewer.Document = renderTarget.Document;

 Inheritance Hierarchy

System.Object
    MindFusion.Reporting.Wpf.FixedDocumentRenderTarget

 See Also

FixedDocumentRenderTarget Members
MindFusion.Reporting.Wpf Namespace