←Select platform

CreateDocumentViewer Method


Creates a new instance of DocumentViewer from the specified options.

public static DocumentViewer CreateDocumentViewer( 
   DocumentViewerCreateOptions createOptions 
Public Shared Function CreateDocumentViewer( 
   ByVal createOptions As DocumentViewerCreateOptions 
) As DocumentViewer 
   static DocumentViewer^ CreateDocumentViewer( 
      DocumentViewerCreateOptions^ createOptions 



Options to use when creating DocumentViewer. This parameter cannot be null.

Return Value

The new DocumentViewer object.


This method works as follows:

  1. The Commands object is created.

  2. If ViewContainer is not null, then View is created and added to it.

  3. If ThumbnailsContainer is not null, then the Thumbnails object is created and added to it.

  4. Bookmarks is created.

  5. If UseAnnotations is true, then Annotations is created.

  6. Diagnostics is created.

  7. Finally, the InteractiveSelectText command is run to set this mode as the default interactive mode for the view. Run any other interactive mode commands after this method returns to set the initial mode to a different value. For example, calling documentViewerInstance.Commands.Run(DocumentViewerCommands.InteractiveAutoPan), null) will set auto-pan to be the default interactive mode.

After the DocumentViewer is created and initialized, it can be used by loading a LEADDocument object and calling the SetDocument method to view the document.


For an example, refer to DocumentViewer.


Target Platforms

Help Version 21.0.2020.9.23
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Viewer.WinForms Assembly