Files
docs-desktop/dotnet-desktop-guide/framework/wpf/advanced/how-to-alter-the-typography-of-text.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.6 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How-to: Alter the Typography of Text 03/30/2017
csharp
vb
setting Typography attributes [WPF]
Typography attribute [WPF], setting
19a3b49b-60a2-4c11-a786-e26b4c965588

How-to: Alter the Typography of Text

The following example shows how to set the xref:System.Windows.Documents.TextElement.Typography%2A attribute, using xref:System.Windows.Documents.Paragraph as the example element.

Example

[!code-xamlTextElementSnippets#_TextElement_TypogXAML]

The following figure shows how this 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

Example

The following example shows how to set the xref:System.Windows.Controls.TextBox.Typography%2A property programmatically.

[!code-csharpTextElementSnippets#_TextElement_Typog] [!code-vbTextElementSnippets#_TextElement_Typog]

See also