Typography.Variants attached property
TOC
Collapse the table of content
Expand the table of content

Typography.Variants attached property

Gets or sets a FontVariants value that indicates a variation of the standard typographic form to be used.


<object Typography.Variants="fontVariantsMemberName"/>

XAML Values

fontVariantsMemberName

A named constant of the FontVariants enumeration, for example Normal.

Remarks

To set this attached property value in code, use the SetVariants method. To get this attached property value in code, use the GetVariants method.

Examples

This XAML example illustrates how to use the Typography.Variants attached property to apply subscript and superscript to text in a Paragraph.


<Paragraph FontFamily="Palatino Linotype">
  2<Run Typography.Variants="Superscript">3</Run>
  14<Run Typography.Variants="Superscript">th</Run>
</Paragraph>

<Paragraph FontFamily="Palatino Linotype">
  H<Run Typography.Variants="Subscript">2</Run>O
  Footnote<Run Typography.Variants="Subscript">4</Run>
</Paragraph>


Requirements (Windows 10 device family)

Device family

API contract

Namespace

Windows.UI.Xaml.Documents

Metadata

Requirements (Windows 8.x and Windows Phone 8.x)

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.Documents

Metadata

Windows.winmd

See also

Typography

 

 

Show:
© 2018 Microsoft