add sample code snippet for maxLength property (#4429)

* add sample code snippet for maxLength property

* removing Page and StackLayout

* remove the other Page tag
This commit is contained in:
Nikolay Tsonev
2017-06-21 21:48:57 +03:00
committed by Alexander Vakrilov
parent 213722fd81
commit f9ec0c9aba

View File

@@ -10,12 +10,8 @@ Using a TextField requires the text-field module.
{%snippet require-textfield%}
### Binding two TextFields text property to observable view-model property.
```XML
<Page loaded="pageLoaded">
<StackLayout orientation="vertical">
{%raw%}<TextField text="{{ someProperty }}" />
<TextField text="{{ someProperty }}" />{%endraw%}
</StackLayout>
</Page>
{%raw%}<TextField text="{{ someProperty }}" />
<TextField text="{{ someProperty }}" />{%endraw%}
```
{%snippet binding-text-property-textfield%}
## Creating a TextField
@@ -34,3 +30,8 @@ Using a TextField requires the text-field module.
{%snippet setting-secure-property%}
### Binding secure property directly to model
{%snippet binding-secure-property%}
### Setting the maxLength property of a TextField
```
<TextField autocorrect="false" hint="Setting Max text length(max 3 characters)" maxLength="3" />
<TextField autocorrect="false" hint="Setting Max text length(max 3 characters) with secure='true'" maxLength="3" secure="true" />
```