TX Text Control .NET Server

Length Property

Property|Introduced in 22.0
Namespace
TXTextControl.Web
Package
TXTextControl.Web as TXTextControl.Web.DocumentEditor.dll from nuget.org, the private NuGet feed or Text Control Offline Packages

Description

Returns the number of characters selected. If this property is zero, no text is selected and the Start property determines the current text input position.

Syntax

public int Length { get; }

Examples

The following example checks Selection.Length before continuing the web document workflow.

var configuredValue = selection.Length;
Console.WriteLine($"Length used by Selection: {configuredValue}");

Limitations

Read only.

Further Reading

  • Reporting: Conditional Formatted Text Blocks –
  • Reporting: Removing Empty Table Rows –
  • Printing Using TX Text Control .NET for WPF –
  • MeasureString for Text in TextControl –