←Select platform

CreateDocumentViewer Method

Summary

Creates a new instance of DocumentViewer from the specified options.

Syntax
C#
VB
C++
public static DocumentViewer CreateDocumentViewer( 
   DocumentViewerCreateOptions createOptions 
) 
Public Shared Function CreateDocumentViewer( 
   ByVal createOptions As DocumentViewerCreateOptions 
) As DocumentViewer 
public:  
   static DocumentViewer^ CreateDocumentViewer( 
      DocumentViewerCreateOptions^ createOptions 
   ) 

Parameters

createOptions

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

Return Value

The new DocumentViewer object.

Remarks

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.

Example

For an example, refer to DocumentViewer.

Requirements

Target Platforms

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

Leadtools.Document.Viewer.WinForms Assembly