Provides access to a rich set of OpenType typography properties. This class cannot be inherited.
Namespace: System.Windows.Documents
Assembly: PresentationFramework (in presentationframework.dll)
XML-Namespaces: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Visual Basic (Deklaration)
Public NotInheritable Class Typography
Visual Basic (Verwendung)
Dim instance As Typography
public sealed class Typography
public ref class Typography sealed
public final class Typography
public final class Typography
Sie können diese verwaltete Klasse nicht in XAML verwenden.
The Typography object exposes the set of features that an OpenType font supports. By setting the properties of Typography in markup or code, you can easily author documents that take advantage of OpenType features.
The following text displays standard capital letters for the Pescadero font, followed by the letters styled as "SmallCaps" and "AllSmallCaps". In this case, the same font size is used for all three words.
Text using OpenType capitals
The following markup example shows how to define capitals for the Pescadero font, using properties of the Typography object. When the "SmallCaps" format is used, any leading capital letter is ignored.
<Paragraph FontFamily="Pescadero" FontSize="48">
<Run>CAPITALS</Run>
<Run Typography.Capitals="SmallCaps">Capitals</Run>
<Run Typography.Capitals="AllSmallCaps">Capitals</Run>
</Paragraph>
The following code example accomplishes the same task as the previous markup example.
MyParagraph.FontFamily = new FontFamily("Pescadero");
MyParagraph.FontSize = 48;
Run run_1 = new Run("CAPITALS ");
MyParagraph.Inlines.Add(run_1);
Run run_2 = new Run("Capitals ");
run_2.Typography.Capitals = FontCapitals.SmallCaps;
MyParagraph.Inlines.Add(run_2);
Run run_3 = new Run("Capitals");
run_3.Typography.Capitals = FontCapitals.AllSmallCaps;
MyParagraph.Inlines.Add(run_3);
MyParagraph.Inlines.Add(new LineBreak());
Typography Properties
The following table lists the properties, values, and default value of the Typography object.
System.Object
System.Windows.Documents.Typography
Alle öffentlichen statischen (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.
Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.
.NET Framework
Unterstützt in: 3.0