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 : object

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

ScrollLeft

The position of the horizontal scrollbar in the viewport if applicable from 0.0 to 1.0, left to right.

Declaration
public float ScrollLeft { get; set; }
Property Value
Type Description
System.Single

ScrollMode

The current ScrollMode.

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

ScrollTop

The position of the vertical scrollbar in the viewport if applicable from 0.0 to 1.0, top to bottom.

Declaration
public float ScrollTop { get; set; }
Property Value
Type Description
System.Single

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

ZoomFactor

A number multiplier indicating the current zoom factor if ZoomMode is set to ZoomFactor. Otherwise this value is ignored. The maximum zoom level is 10.0 and the minimum is 0.5.

Declaration
public float ZoomFactor { get; set; }
Property Value
Type Description
System.Single

ZoomMode

The current ZoomMode. If set to ZoomFactor then the value in ZoomFactor is used to zoom in or out.

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

Methods

Clone()

Declaration
public ViewState Clone()
Returns
Type Description
ViewState