TX Text Control .NET Server

View Class

Class|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Server.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Server.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll
Inherits
  1. MarshalByRefObject
  2. View

Description

An instance of the View class represents a part of a document for which an image can be generated. The part is defined through the view's location and size. It can be obtained through the ServerVisualization.TextViewGenerator.View, ServerVisualization.RulerBarViewGenerator.View, ServerVisualization.StatusBarViewGenerator.View and ServerVisualization.DialogViewGenerator.View properties.

Syntax

public class View : MarshalByRefObject

Examples

The following example includes the location value from a View object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Location: {view.Location}");
Console.WriteLine("View is ready for use.");

Members

Properties

PropertyDescription
LocationGets or sets the view's location, in twips.
ScrollPaddingThis property gets the minimum amout of the visible page background. In the PageView view mode a TextControl displays pages with a border and a background outside of the pages.
SizeGets or sets the view's size, in twips.
ZoomFactorGets or sets the zoom factor, in percent, with which the View object generates the image.

Methods

MethodDescription
GetCursorKindReturns the cursor kind for a certain location in a document.
GetImageGets a part of a document as an image.
GetUpdateRectangleReturns the coordinates of the smallest rectangle that completely encloses the update region. When the document's visible part changes, a Changed event occurs and the changed part is added to the view's update region. The bValidate parameter can be used to reset the current update region to an empty rectangle. When the document's visible part changes because the document has been scrolled, the Changed event informs about the changed part, but it is not added to the update region.
OnAutoHScrollRaises the AutoHScroll event.
OnAutoVScrollRaises the AutoVScroll event.
OnChangedRaises the view's Changed event.
OnZoomedRaises the View's Zoomed event.

Events

EventDescription
AutoHScrollOccurs when the horizontal location of the view has been changed automatically. This can be happen, if the input position is moved outside of the document part which is defined through the View object. The event handler receives an argument of type EventArgs containing data related to this event.
AutoVScrollOccurs when the vertical location of the view has been changed automatically. This can be happen, if the input position is moved outside of the document part which is defined through the View object. The event handler receives an argument of type EventArgs containing data related to this event.
ChangedOccurs after the contents of the View object's image have been changed. The event handler receives an argument of type ViewChangedEventArgs containing data related to this event.
ZoomedOccurs after the View object's zoom factor has been changed. The event handler receives an argument of type EventArgs containing data related to this event.