RulerBar Property
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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; }Public Property RulerBar As RulerBarViewGeneratorExamples
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.");
}Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection
textViewGenerator.RulerBar = New TXTextControl.ServerVisualisation.RulerBarViewGenerator()
If textViewGenerator.RulerBar IsNot Nothing Then
Console.WriteLine("Text View Generator: Ruler Bar is available.")
End If