| 4 | import * as observable from '@nativescript/core/data/observable'; |
| 5 | |
| 6 | export function stack0Loaded(args: observable.EventData) { |
| 7 | var source = new observable.Observable(); |
| 8 | var stack0 = <stackLayoutModule.StackLayout>args.object; |
| 9 | var target = stack0.getViewById<textFieldModule.TextField>('tf'); |
| 10 | var button = stack0.getViewById<textFieldModule.TextField>('btn'); |
| 11 | var bindingOptions = { |
| 12 | sourceProperty: 'textSource', |
| 13 | targetProperty: 'text', // , |
| 14 | // twoWay: true |
| 15 | }; |
| 16 | target.bind(bindingOptions, source); |
| 17 | source.set('textSource', 'Text'); |
| 18 | |
| 19 | button.on(buttonModule.Button.tapEvent, function () { |
| 20 | button.text = source.get('textSource'); |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | export function stack1Loaded(args: observable.EventData) { |
| 25 | var stack1 = <stackLayoutModule.StackLayout>args.object; |