TX Text Control .NET for WPF

Capitals Property

Property|Introduced in 30.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 values specifying wheather lowercase letters are displayed with capital letters. Lowercase letters are displayed either with capital letters of the same size or with capital letters which have a smaller size. The smaller size is either the size of the lowercase 'x' (petite caps) or the size of the lowercase 'x' + 10% (small caps).

Syntax

public Capitals Capitals { get; set; }

Members

ValueDescription
NoneThere are no text effects with capital letters.
CapitalsAll lowercase letters are displayed with capital letters.
PetiteCapitalsAll lowercase letters are displayed with capital letters which have the size of the lowercase 'x'.
SmallCapitalsAll lowercase letters are displayed with capital letters which have the size of the lowercase 'x' + 10%.

Examples

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

FormattingStyle formattingStyle = new InlineStyle("Emphasis");

formattingStyle.Capitals = Capitals.Capitals;
Console.WriteLine($"Capitals used by Formatting Style: {formattingStyle.Capitals}");

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