--- title: "TextBlock Overview" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "controls [WPF], TextBlock" - "TextBlock control [WPF]" ms.assetid: 24720bca-341a-4b03-8a6b-7a678023b10a --- # TextBlock Overview The control provides flexible text support for [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] applications. The element is targeted primarily toward basic [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] 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 , , , , and . Text content can be added using the property. When used in [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)], content between the open and closing tag is implicitly added as the text of the element. A element can be instantiated very simply using [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)]. [!code-xaml[TextBlockSnip_XAML#2](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBlockSnip_XAML/CS/default.xaml#2)] Similarly, usage of the element in code is relatively simple. [!code-csharp[TextBlockSnip#1](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBlockSnip/CSharp/TextBlockSnips.cs#1)] [!code-vb[TextBlockSnip#1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBlockSnip/VisualBasic/TextBlockSnips.vb#1)] ## See also -