* 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
1.9 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | ||||
|---|---|---|---|---|---|---|---|---|
| TextBlock Overview | 03/30/2017 |
|
|
24720bca-341a-4b03-8a6b-7a678023b10a |
TextBlock Overview
The xref:System.Windows.Controls.TextBlock control provides flexible text support for [!INCLUDETLA2#tla_winclient] applications. The element is targeted primarily toward basic [!INCLUDETLA2#tla_ui] scenarios that do not require more than one paragraph of text. It supports a number of properties that enable precise control of presentation, such as xref:System.Windows.Controls.TextBlock.FontFamily%2A, xref:System.Windows.Controls.TextBlock.FontSize%2A, xref:System.Windows.Controls.TextBlock.FontWeight%2A, xref:System.Windows.Controls.TextBlock.TextEffects%2A, and xref:System.Windows.Controls.TextBlock.TextWrapping%2A. Text content can be added using the xref:System.Windows.Controls.TextBlock.Text%2A property. When used in [!INCLUDETLA2#tla_xaml], content between the open and closing tag is implicitly added as the text of the element.
A xref:System.Windows.Controls.TextBlock element can be instantiated very simply using [!INCLUDETLA2#tla_xaml].
[!code-xamlTextBlockSnip_XAML#2]
Similarly, usage of the xref:System.Windows.Controls.TextBlock element in code is relatively simple.
[!code-csharpTextBlockSnip#1] [!code-vbTextBlockSnip#1]