The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
IDocumentPaginatorSource Interface
Visual Studio 2010
Defines the source object that performs actual content pagination.
Assembly: PresentationCore (in PresentationCore.dll)
The IDocumentPaginatorSource type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DocumentPaginator | When implemented in a derived class, gets the object that performs content pagination. |
The following example shows use of the IDocumentPaginatorSource interface.
' ------------------------- LoadDocumentViewer ----------------------- ''' <summary> ''' Loads content from a file to a DocumentViewer control.</summary> ''' <param name="xpsFilename"> ''' The path and name of the XPS file to ''' load to the DocumentViewer control.</param> ''' <remarks> ''' Exception handling should be added if the xpsFilename may not be ''' valid or if the FixedDocumentSequence contained in the file is ''' incorrect. (In this sample the files are hardcoded.)</remarks> Private Sub LoadDocumentViewer(ByVal xpsFilename As String) ' Save a reference to the currently open XPS package. Dim oldXpsPackage As XpsDocument = _xpsPackage ' Open the package for the new XPS document. _xpsPackage = New XpsDocument(xpsFilename, FileAccess.Read, CompressionOption.NotCompressed) ' Get the FixedDocumentSequence from the package. Dim fixedDocumentSequence As FixedDocumentSequence = _xpsPackage.GetFixedDocumentSequence() ' Set the new FixedDocumentSequence as ' the DocumentViewer's paginator source. docViewer.Document = TryCast(fixedDocumentSequence, IDocumentPaginatorSource) ' If there was an old XPS package, close it now that ' DocumentViewer no longer needs to access it. If oldXpsPackage IsNot Nothing Then oldXpsPackage.Close() End If ' Leave the new _xpsPackage open for DocumentViewer ' to access additional required resources. End Sub ' end:LoadDocumentViewer()
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Community Additions
Show:
