Optional initial view options to use when a document is set in a document viewer.
[SerializableAttribute()]
[DataContractAttribute()]
public class DocumentViewOptions
<SerializableAttribute(),
DataContractAttribute()>
Public Class DocumentViewOptions
public:
[SerializableAttribute,
DataContractAttribute]
ref class DocumentViewOptions
DocumentViewOptions can be used to set optional initial view options when a document is set in a DocumentViewer.
Documents are set in the viewer using DocumentViewer.SetDocument. During this call, the viewer will check the value of LEADDocument.ViewOptions, and if it contains a valid value (not null) the viewer will try to set up the view initially as indicated by the options in the class as follows:
Member | Action |
---|---|
PageNumber | If this value is not 0 or 1, the document viewer will try to set the current page number using DocumentViewer.GotoPage. |
ViewLayout | Runs the corresponding Layout.* command. |
AnnotationsUserMode | Runs the corresponding Annotations.UserMode* command. |
ViewZoomPercent | Runs the View.ZoomPercentage command with the specified percentage. |
ViewScrollOffset | Scrolls the view by the specified amount. |
ViewSizeMode | Runs the corresponding View.ActualSize , View.FitWidth or View.FitPage command. |
ViewItemType | Runs the View.ItemType with the specified mode. |
LoadAnnotations | If true, creates the annotation UI elements and tries to load the annotations stored in the document. If false, the annotation UI elements in the viewer are disabled and hidden. |
LoadThumbnails | If true, creates the thumbnail UI elements and tries to load the thumbnails of the pages of the document. If false, the thumbnails UI elements in the viewer are disabled and hidden. |
LoadBookmarks | If true, creates the bookmark UI elements and tries to load the bookmarks stored in the document. If false, the bookmark UI elements in the viewer are disabled and hidden. |
ViewCommands | Additional user-defined document viewer commands to run. |
Refer to Document Viewer Commands for more information on the commands.
In all the operations described above, the document viewer will perform sanity checks on the values before performing the action. For instance, if PageNumber is set to 5 but the document contains only 4 pages, then DocumentViewer.GotoPage is not called and the default page number (1) is viewed instead.
Setting view options in a document can be performed programmatically or interactively using the document viewer demo.
To create or update the view options programmatically on a LEADDocument:
Now, when this document is loaded into a DocumentViewer using SetDocument, the view options are parsed and the commands are performed.
To create or update the view options interactively using the document viewer demos:
Now, when this document is loaded into a DocumentViewer using SetDocument, the view options are parsed and the commands are performed.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document