RulerBarViewGenerator 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
- Component
- Ruler
Bar View Generator
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 : ComponentPublic Class RulerBarViewGenerator
Inherits ComponentExamples
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;Dim rulerBarViewGenerator As New TXTextControl.ServerVisualisation.RulerBarViewGenerator()
rulerBarViewGenerator.Alignment = RulerBarAlignment.TopMembers
Constructors
| Constructor | Description |
|---|---|
| RulerBarViewGenerator | Initializes a new instance of the RulerBarViewGenerator class. After initialization the Create method must be called to enable further resources. |
Properties
| Property | Description |
|---|---|
| Alignment | Gets 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. |
| BorderStyle | Gets or sets the border style of the ruler bar. |
| DisplayColors | Gets 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. |
| EnablePageMargins | Enables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled. |
| FormulaMode | Gets 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. |
| Location | Gets 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. |
| ReadOnly | Gets 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. |
| Resolution | Gets 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. |
| ScaleUnit | Gets or sets the unit of the ruler bar's scale. |
| UserInput | Gets the UserInput object, which can be used to inform the RulerBarViewGenerator about user input. The generator uses this information to generate a new view. |
| View | Gets the View object, which informs about view changes and provides an image of the RulerBarViewGenerator's current state. |
Methods
| Method | Description |
|---|---|
| Create | Initializes 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. |
| ResetDisplayColors | Resets all display colors of a ruler bar to their system dependent default values. |
| ResetMaxSize | Not described in the reference. public void ResetMaxSize(); |