mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Needed to have a nice structured cookbook dir in the docs Includes: Move the data-module tests under the data dir Move the frame tests under the ui dir Rename the dialog.md file to dialogs.md Fix the web-view title Add previous_url attributes to each article for SEO Rename the style dir to styling to match the reference Fix the frame-tests path
34 lines
825 B
Markdown
34 lines
825 B
Markdown
---
|
|
nav-title: "Label How-To"
|
|
title: "label"
|
|
description: "Examples for using Label"
|
|
previous_url: /ApiReference/ui/label/HOW-TO
|
|
---
|
|
# Label
|
|
Using a label requires the Label module.
|
|
<snippet id='label-require'/>
|
|
|
|
### Binding the Label text property to a view-model property.
|
|
``` XML
|
|
<Page>
|
|
{%raw%}<Label text="{{ title }}" />{%endraw%}
|
|
</Page>
|
|
```
|
|
### How to set label text content
|
|
<snippet id='label-settext'/>
|
|
|
|
### How to turn on text wrapping for a label
|
|
<snippet id='label-textwrap'/>
|
|
|
|
### How to style a label via css class
|
|
<snippet id='label-cssclass'/>
|
|
|
|
### How to style a label via css type
|
|
<snippet id='label-cssclass-type'/>
|
|
|
|
### How to style a label via css control identifier
|
|
<snippet id='label-css-identifier'/>
|
|
|
|
### How to bind text property of a label to an observable model
|
|
<snippet id='label-observable'/>
|