TX Text Control .NET Server

CharacterScaling Property

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

Description

Gets or sets a character scaling, in percent of the average character width, of the selected text.

Syntax

public int CharacterScaling { get; set; }

Examples

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

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

selection.CharacterScaling = 10;
Console.WriteLine($"Character Scaling used by Selection: {selection.CharacterScaling}");

Remarks

The property's default value is 100.

The property returns its default value when the text selection contains multiple characters with mixed character scaling settings. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.