Files
NativeScript/apps/ui/app/layouts/dock-page.ts
Nathan Walker 1e6fccf272 chore: cleanup
2020-07-23 14:03:37 -07:00

17 lines
495 B
TypeScript

import * as pageModule from '@nativescript/core/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;
}
}