Typography.StandardSwashes Property

Definition

Gets or sets a value that specifies the index of a standard swashes form.

C#
public int StandardSwashes { get; set; }

Property Value

The index of the standard swashes 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.

Swashes are decorative glyphs that use elaborate ornamentation often associated with calligraphy. The following text displays standard and swash glyphs for the Pescadero font.

Text using OpenType standard and swash glyphs Example of standard and swash glyphs

Swashes are often used as decorative elements in short phrases such as event announcements. The following text uses swashes to emphasize the capital letters of the name of the event.

Text using OpenType swashes Example of swashes used for capital letters

The following code example shows how to define swashes for a font, using the StandardSwashes property.

XAML
<Paragraph FontFamily="Pescadero" TextBlock.TextAlignment="Center">
  Wishing you a<LineBreak/>
  <Run Typography.StandardSwashes="1" FontSize="36">Happy New Year!</Run>
</Paragraph>

If the value of StandardSwashes is greater than zero and the selected font does not support standard swashes forms at the given index value, the default form of the letter is displayed.

XAML Attribute Usage

<object Typography.StandardSwashes="int"/>

Dependency Property Information

Item Value
Identifier field StandardSwashesProperty
Metadata properties set to true AffectsMeasure, AffectsRender, Inherits

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also