Typography.StylisticAlternates Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value that specifies the index of a stylistic alternates form.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public int StylisticAlternates { get; set; }

Property Value

Type: System.Int32

The index of the stylistic alternates form. The default value is 0 (zero).

This property gets or sets a value on the object that owns a Typography property, which is the only way to access a Typography class instance. In addition, this property supports an attached property usage so that it can be set on text-containing objects in XAML.

Alternates are glyphs that can be substituted for a standard glyph. OpenType fonts, such as the Pericles font used in the following examples, contain alternate glyphs that you can use to create different appearances for text. The following text displays standard glyphs for the Pericles font.

Text using OpenType standard glyphs

Example of standard set of glyphs

The Pericles OpenType font contains additional glyphs that provide stylistic alternates to the standard set of glyphs. The following text displays stylistic alternate glyphs.

Text using OpenType stylistic alternate glyphs

Example of stylistic alternate glyphs

The following code example shows how to define stylistic alternate glyphs for the Pericles font, using the StylisticAlternates property.

The following text displays several other stylistic alternate glyphs for the Pericles font.

Text using OpenType stylistic alternate glyphs

Example of other stylistic alternate glyphs

The following code example shows how to define these other stylistic alternate glyphs.

<object Typography.StylisticAlternates="int"/>

.NET Framework
Available since 3.0
Return to top
Show: