Class ViewState

The ViewState holds information about the current UI representation of a specific document.

Inheritance
System.Object
ViewState
Namespace: PSPDFKit.UI
Assembly: PSPDFKit.dll
Syntax
public sealed class ViewState

Properties

AllowPrinting

True if printing is allowed. Otherwise false.

Declaration
public bool AllowPrinting { get; set; }
Property Value
Type Description
System.Boolean

CurrentPageIndex

The currently displayed page's index.

Declaration
public int CurrentPageIndex { get; set; }
Property Value
Type Description
System.Int32

InteractionMode

The current InteractionMode.

Declaration
public InteractionMode InteractionMode { get; set; }
Property Value
Type Description
InteractionMode

KeepFirstSpreadAsSinglePage

True if the first page is single in spread mode. Otherwise false.

Declaration
public bool KeepFirstSpreadAsSinglePage { get; set; }
Property Value
Type Description
System.Boolean

LayoutMode

The current LayoutMode.

Declaration
public LayoutMode LayoutMode { get; set; }
Property Value
Type Description
LayoutMode

PreventTextCopy

When copying of text is disabled, it's still possible to select text but copying either using the shortcut or a context menu will have no effect. Changing this property has no effect after a document has loaded. Load the document again if you wish to update this property.

Declaration
public bool PreventTextCopy { get; set; }
Property Value
Type Description
System.Boolean

ReadOnly

True if the document is currently in UI read only mode. Otherwise false.

Declaration
public bool ReadOnly { get; set; }
Property Value
Type Description
System.Boolean

ShowAnnotations

True if annotations are currently shown. Otherwise false.

Declaration
public bool ShowAnnotations { get; set; }
Property Value
Type Description
System.Boolean

ShowToolbar

True if the toolbar is currently show. Otherwise false.

Declaration
public bool ShowToolbar { get; set; }
Property Value
Type Description
System.Boolean

SidebarMode

The current SidebarMode.

Declaration
public SidebarMode SidebarMode { get; set; }
Property Value
Type Description
SidebarMode

SidebarPlacement

The current SidebarPlacement.

Declaration
public SidebarPlacement SidebarPlacement { get; set; }
Property Value
Type Description
SidebarPlacement

ZoomMode

The current ZoomMode.

Declaration
public ZoomMode ZoomMode { get; set; }
Property Value
Type Description
ZoomMode

Methods

Clone()

Declaration
public ViewState Clone()
Returns
Type Description
ViewState