Files
Andy (Steve) De George be103da07e Replace various WPF include files with content (#1335)
* net-current-v30plus-md.md

* net-current-v40plus-md.md

* tla2sharptla-ui-md.md

* tla2sharptla-uiautomation-md.md

* tla2sharptla-winclient-md.md

* tla2sharptla-xaml-md.md

* tlasharptla-ui-md.md

* tlasharptla-uiautomation-md.md

* tlasharptla-winclient-md.md

* tlasharptla-xaml-md.md

* fix warnings
2022-03-16 12:14:11 -04:00

1.8 KiB

title, ms.date, f1_keywords, helpviewer_keywords, ms.assetid
title ms.date f1_keywords helpviewer_keywords ms.assetid
Label 03/30/2017
AutoGeneratedOrientationPage
controls [WPF], Label
Label control [WPF]
241c1ce2-60f8-4613-a0ec-9b9bb25fb6af

Label

xref:System.Windows.Controls.Label controls usually provide information in the user interface (UI). Historically, a xref:System.Windows.Controls.Label has contained only text, but because the xref:System.Windows.Controls.Label that ships with Windows Presentation Foundation (WPF) is a xref:System.Windows.Controls.ContentControl, it can contain either text or a xref:System.Windows.UIElement.

A xref:System.Windows.Controls.Label provides both functional and visual support for access keys. It is frequently used to enable quick keyboard access to controls such as a xref:System.Windows.Controls.TextBox. To assign a xref:System.Windows.Controls.Label to a xref:System.Windows.Controls.Control, set the xref:System.Windows.Controls.Label.Target%2A?displayProperty=nameWithType property to the control that should get focus when the user presses the access key.

The following image shows a xref:System.Windows.Controls.Label "Theme" that targets a xref:System.Windows.Controls.ComboBox. When the user presses T, the xref:System.Windows.Controls.ComboBox receives focus. For more information, see How to: Set the Target Property of a Label.

Screenshot of Display Properties dialog showing labeled by usage.

In This Section

How to: Create a Control That Has an Access Key and Text Wrapping

Reference

xref:System.Windows.Controls.Label