Expand Minimize

RichTextBlock.CharacterSpacing property

Applies to Windows and Windows Phone

Gets or sets the uniform spacing between characters, in units of 1/1000 of an em.

Syntax


Public Property CharacterSpacing As Integer


<RichTextBlock CharacterSpacing="int"/>

Property value

Type: System.Int32 [.NET] | int32 [C++]

The uniform spacing between characters, in units of 1/1000 of an em. The default is 0. Positive values increase tracking and loosen character spacing. Negative values decrease tracking and tighten the character spacing.

Remarks

Tracking is the typographic term for an amount of space added or removed between all pairs of characters in a portion of text. This feature can be accessed through the CharacterSpacing property on TextBlock and RichTextBlock. CharacterSpacing is measured in 1/1000 of an "em". One "em" is equivalent to the current font size of the control. For example, an additional 14 pixels will be inserted between each character in a text control with FontSize="14" and CharacterSpacing="1000".

Examples

To see an example, see scenario 1, "Tracking (character spacing)", of the XAML text display sample.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

RichTextBlock
XAML text display sample

 

 

Show:
© 2014 Microsoft