TextElement.Typography Property


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

Gets the currently effective typography variations for the content of the element.

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

member Typography : Typography with get

Property Value

Type: System.Windows.Documents.Typography

A Typography object that specifies the currently effective typography variations. For a list of default typography values, see Typography.

The Typography property is applicable only to OpenType fonts. A typography variant has no effect on fonts that do not support the variant. For more information on this topic, see Typography in WPF.

The following example shows how to set the Typography attribute, using Paragraph as the example element.

  FontFamily="Palatino Linotype"
    This text has some altered typography characteristics.  Note
    that use of an open type font is necessary for most typographic
    properties to be effective.
    0123456789 10 11 12 13
    1/2 2/3 3/4

The following figure shows how the preceding example renders.

Screenshot: Text with altered typography

In contrast, the following figure shows how a similar example with default typographic properties renders.

Screenshot: Text with altered typography

The following example shows how to set the Typography property programmatically.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top