TX Text Control .NET Server

RulerBar Property

Property|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Specifies the horizontal ruler bar to be used with the TextViewGenerator. The property value is null, if there is no ruler bar connected. Otherwise it is an object of the type RulerBarViewGenerator. It automatically shows formatting attributes at the current text input position.

Syntax

public RulerBarViewGenerator RulerBar { get; set; }

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.RulerBar.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

textViewGenerator.RulerBar = new TXTextControl.ServerVisualisation.RulerBarViewGenerator();
if (textViewGenerator.RulerBar != null)
{
    Console.WriteLine("Text View Generator: Ruler Bar is available.");
}