View Class
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Server. Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.Server. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.Server. dll
- Inherits
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 : MarshalByRefObjectPublic Class View
Inherits MarshalByRefObjectExamples
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.");Console.WriteLine($"Location: {view.Location}")
Console.WriteLine("View is ready for use.")Members
Properties
| Property | Description |
|---|---|
| Location | Gets or sets the view's location, in twips. |
| ScrollPadding | This 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. |
| Size | Gets or sets the view's size, in twips. |
| ZoomFactor | Gets or sets the zoom factor, in percent, with which the View object generates the image. |
Methods
| Method | Description |
|---|---|
| GetCursorKind | Returns the cursor kind for a certain location in a document. |
| GetImage | Gets a part of a document as an image. |
| GetUpdateRectangle | Returns 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. |
| OnAutoHScroll | Raises the AutoHScroll event. |
| OnAutoVScroll | Raises the AutoVScroll event. |
| OnChanged | Raises the view's Changed event. |
| OnZoomed | Raises the View's Zoomed event. |
Events
| Event | Description |
|---|---|
| AutoHScroll | Occurs 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. |
| AutoVScroll | Occurs 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. |
| Changed | Occurs 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. |
| Zoomed | Occurs 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. |