This commit is contained in:
NickIliev
2017-04-10 14:15:16 +03:00
parent e5018c72f4
commit 1666aa9431
3 changed files with 11 additions and 6 deletions

View File

@@ -8,7 +8,6 @@ previous_url: /ApiReference/ui/text-field/HOW-TO
# TextField
Using a TextField requires the text-field module.
{%snippet require-textfield%}
{%snippet require-observable-textfield%}
### Binding two TextFields text property to observable view-model property.
```XML
<Page loaded="pageLoaded">

View File

@@ -26,9 +26,9 @@ import * as observable from "tns-core-modules/data/observable";
// </Page>
// << text-view-xml
// >> observable-declare
// function pageLoaded(args) {
// var page = args.object;
// var obj = new observable.Observable();
// export function pageLoaded(args) {
// let page = args.object;
// let obj = new observable.Observable();
// obj.set("someProperty", "Please change this text!");
// page.bindingContext = obj;
// }

View File

@@ -8,9 +8,15 @@ previous_url: /ApiReference/ui/text-view/HOW-TO
# TextView
Using a TextView requires the text-view module.
{%snippet require-textmodules%}
{%snippet require-observable-textview%}
### Binding two TextViews text property to observable view-model property.
{%snippet text-view-xml%}
```XML
<Page loaded="pageLoaded">
<StackLayout orientation="vertical">
{%raw%}<TextView text="{{ someProperty }}" />
<TextView text="{{ someProperty }}" />{%endraw%}
</StackLayout>
</Page>
```
{%snippet observable-declare%}
### Creating a TextView
{%snippet text-view-create%}