TX Text Control .NET for WPF

TabLeaders Property

Property|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets an array containing the tab leaders in a paragraph. A tab leader defines how a tab gap is filled.

Syntax

public TabLeader[] TabLeaders { get; set; }

Members

ValueDescription
NoneThe tab gap is not filled.
PeriodThe tab gap is filled with periods.
DotThe tab gap is filled with dots.
DashThe tab gap is filled with dashes.
UnderlineThe tab gap is underlined.

Examples

The following example applies paragraph layout to selected report text by using ParagraphFormat.TabLeaders.

textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;

paragraphFormat.TabLeaders = new TabLeader[] { TabLeader.Period };
if (paragraphFormat.TabLeaders != null)
{
    Console.WriteLine("Paragraph Format: Tab Leaders is available.");
}

textControl.Selection.ParagraphFormat = paragraphFormat;

Limitations

The maximum number of tabs in a parapgraph is 14.

Remarks

The default type is TabLeader.None.

The property returns an array with common values when the text selection contains multiple paragraphs with mixed types. If the selection contains different tab leaders, the Selection.IsCommonValueSelected method returns false.