author | Description | title | ms.assetid | label | template | ms.author | ms.date | ms.topic | ms.prod | ms.technology | keywords | pm-contact | design-contact | doc-status | ms.localizationpriority |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Jwmsft |
Use a label to indicate to the user what they should enter into an adjacent control. You can also label a group of related controls, or display instructional text near a group of related controls. |
Labels |
CFACCCD4-749F-43FB-947E-2591AE673804 |
Labels |
detail.hbs |
jimwalk |
05/19/2017 |
article |
windows |
uwp |
windows 10, uwp |
miguelrb |
ksulliv |
Published |
medium |
A label is the name or title of a control or a group of related controls.
Important APIs: Header property, TextBlock class
In XAML, many controls have a built-in Header property that you use to display the label. For controls that don't have a Header property, or to label groups of controls, you can use a TextBlock instead.
- Use a label to indicate to the user what they should enter into an adjacent control. You can also label a group of related controls, or display instructional text near a group of related controls.
- When labeling controls, write the label as a noun or a concise noun phrase, not as a sentence, and not as instructional text. Avoid colons or other punctuation.
- When you do have instructional text in a label, you can be more generous with text-string length and also use punctuation.
- Text controls
- TextBox.Header property
- PasswordBox.Header property
- ToggleSwitch.Header property
- DatePicker.Header property
- TimePicker.Header property
- Slider.Header property
- ComboBox.Header property
- RichEditBox.Header property
- TextBlock class