Typography.StylisticAlternates Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that specifies the index of a stylistic alternates form.
public:
property int StylisticAlternates { int get(); void set(int value); };
public int StylisticAlternates { get; set; }
member this.StylisticAlternates : int with get, set
Public Property StylisticAlternates As Integer
Property Value
The index of the stylistic alternates form. The default value is 0 (zero).
Remarks
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
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
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
</Paragraph>
The following text displays several other stylistic alternate glyphs for the Pericles font.
Example of other 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>
</Paragraph>
XAML Attribute Usage
<object Typography.StylisticAlternates="int"/>
Dependency Property Information
Identifier field | StylisticAlternatesProperty |
Metadata properties set to true |
AffectsMeasure, AffectsRender, Inherits |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기