This documentation is archived and is not being maintained.

Typography.StylisticAlternates Property

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; }
<object Typography.StylisticAlternates="int"/>

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.

Example of standard set of glyphs

Text using OpenType standard 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.

Example of stylistic alternate glyphs

Text using OpenType stylistic alternate glyphs

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

<Paragraph FontFamily="Pericles">
  <Run Typography.StylisticAlternates="1">A</Run>NCIENT
  GR<Run Typography.StylisticAlternates="1">EE</Run>K
  MYTH<Run Typography.StylisticAlternates="1">O</Run>LOGY

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

Example of other stylistic alternate glyphs

Text using OpenType stylistic alternate glyphs

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

<Paragraph FontFamily="Pericles">
  <Run Typography.StylisticAlternates="1">A</Run>
  <Run Typography.StylisticAlternates="2">A</Run>
  <Run Typography.StylisticAlternates="3">A</Run>
  <Run Typography.StylisticAlternates="1">C</Run>
  <Run Typography.StylisticAlternates="1">E</Run>
  <Run Typography.StylisticAlternates="1">G</Run>
  <Run Typography.StylisticAlternates="1">O</Run>
  <Run Typography.StylisticAlternates="1">Q</Run>
  <Run Typography.StylisticAlternates="1">R</Run>
  <Run Typography.StylisticAlternates="2">R</Run>
  <Run Typography.StylisticAlternates="1">S</Run>
  <Run Typography.StylisticAlternates="1">Y</Run>

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.