TX Text Control .NET for WPF

Text Property

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

Description

Gets or sets a string containing the currently selected text.

Syntax

public string Text { get; set; }

Examples

The following example formats the heading of a short document by using Selection.Text.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.Text = "Quarterly results";
if (!string.IsNullOrWhiteSpace(selection.Text))
{
    Console.WriteLine($"Text: {selection.Text}");
}

Limitations

Runtime only.

Further Reading

  • MailMerge: Merge Hyperlinks into Merge Fields –
  • Reporting: Conditional Formatted Text Blocks –
  • Restart the Page Numbering Fields Per Section –
  • Inserting MS Word Compatible Page Number Fields –