TX Text Control .NET Server

RulerBarViewGenerator 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. Component
  2. RulerBarViewGenerator

Description

An instance of the RulerBarViewGenerator class can be used to visualize a ruler bar through an image. It manages a ServerVisualization.UserInput and a ServerVisualization.View object. These objects can be used to inform the generator about user input and to get a generated view depending on the input. A RulerBarViewGenerator object can be connected with a TextViewGenerator object to show the formatting attributes at the curent text input position. The RulerBarViewGenerator class is inherited from the System.ComponentModel.Component class. The following describes only the properties, methods and events defined through the RulerBarViewGenerator class. For a list of properties, methods and events inherited from the System.ComponentModel.Component class see the .NET Framework reference.

Syntax

public class RulerBarViewGenerator : Component

Examples

The following example creates a Ruler Bar View Generator instance and configures its alignment setting for a document workflow.

using TXTextControl.ServerVisualisation.RulerBarViewGenerator rulerBarViewGenerator = new();
rulerBarViewGenerator.Alignment = RulerBarAlignment.Top;

Members

Constructors

ConstructorDescription
RulerBarViewGeneratorInitializes a new instance of the RulerBarViewGenerator class. After initialization the Create method must be called to enable further resources.

Properties

PropertyDescription
AlignmentGets or sets a value specifying the alignment of the ruler bar in the document. Depending on the alignment either a horizontal or a vertical ruler is displayed.
BorderStyleGets or sets the border style of the ruler bar.
DisplayColorsGets or sets the colors of the ruler bar. These colors are only used when the BorderStyle property has been set to ColorScheme. The property value is an object of the type ServerVisualization.RulerBarViewGenerator.Colors.
EnablePageMarginsEnables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled.
FormulaModeGets or sets a value specifying whether the ruler bar shows cell references when the current input position is in a table cell. Depending on the TextControl.FormulaReferenceStyle property cell references are shown either in the A1 or in the R1C1 notation. This property has no effect when the BorderStyle property has been set to RulerBarBorderStyle.Simple3D or RulerBarBorderStyle.Fixed3D.
LocationGets or sets a location, in pixels. When a RulerBarViewGenerator object is connected with a TextViewGenerator object, this location is used to adjust the ruler with the text. It determines the position of the ruler image relative to the text image.
ReadOnlyGets or sets a value determining the ruler bar's read only mode. When the ruler bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.
ResolutionGets or sets a resolution, in dots per inch (dpi) for all images, provided through the View property. When this property is set to zero, the system resolution is used.
ScaleUnitGets or sets the unit of the ruler bar's scale.
UserInputGets the UserInput object, which can be used to inform the RulerBarViewGenerator about user input. The generator uses this information to generate a new view.
ViewGets the View object, which informs about view changes and provides an image of the RulerBarViewGenerator's current state.

Methods

MethodDescription
CreateInitializes the resources of a newly instantiated object. This method must be called before using the object. To release created resources, Dispose should be called after using the object.
ResetDisplayColorsResets all display colors of a ruler bar to their system dependent default values.
ResetMaxSizeNot described in the reference. public void ResetMaxSize();