import * as pageModule from '@nativescript/core/ui/page' ; import * as model from './myview' ; export function onLoaded ( args ) { var page = < pageModule . Page > args . object ; page . bindingContext = new model . ViewModelWithPercentage ( ) ; } export function onStretchLastChild ( args ) { var layout = args . object . parent ; if ( layout . stretchLastChild === true ) { layout . stretchLastChild = false ; } else { layout . stretchLastChild = true ; } }