TX Text Control .NET for Windows Forms

CharacterSpacing Property

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

Description

Gets or sets the style's character spacing value, in twips. This value is added to each character. When it is negative, character spacing is reduced, otherwise it is extended.

Syntax

public int CharacterSpacing { get; set; }

Examples

The following example creates a reusable emphasis style and adds it to the document by using FormattingStyle.CharacterSpacing.

FormattingStyle formattingStyle = new InlineStyle("Emphasis");

formattingStyle.CharacterSpacing = 720;
Console.WriteLine($"Character Spacing used by Formatting Style: {formattingStyle.CharacterSpacing}");

textControl.InlineStyles.Add((InlineStyle)formattingStyle);