mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-23 09:01:10 +08:00
16 lines
504 B
TypeScript
16 lines
504 B
TypeScript
import * as pageModule from "ui/page";
|
|
import * as model from "./myview";
|
|
|
|
export function onLoaded(args: { eventName: string, object: any }) {
|
|
var page = <pageModule.Page>args.object;
|
|
page.bindingContext = new model.ViewModel();
|
|
}
|
|
|
|
export function onStretchLastChild(args: { eventName: string, object: any }) {
|
|
var layout = args.object.parent;
|
|
if(layout.stretchLastChild === true) {
|
|
layout.stretchLastChild = false;
|
|
} else {
|
|
layout.stretchLastChild = true;
|
|
}
|
|
} |