本文整理汇总了TypeScript中tabris.Page类的典型用法代码示例。如果您正苦于以下问题:TypeScript Page类的具体用法?TypeScript Page怎么用?TypeScript Page使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Page类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test_Page
function test_Page() {
var page: Page = new Page();
page.set("foo", 23);
page.set({
image: {src: "http://example.com"},
title: "foo",
topLevel: true
});
page.open().close();
}
示例2: Page
import {Page, Composite} from 'tabris';
let widget: Page = new Page();
widget.appendTo(new Composite());
widget.insertBefore(new Composite());
widget.insertAfter(new Composite());
/*Expected
(4,
not assignable to parameter
(5,
not assignable to parameter
(6,
not assignable to parameter
*/
示例3: Page
import {Page, Action, ImageValue, EventObject, Properties, NavigationView, WidgetCollection} from 'tabris';
let widget: Page = new Page();
// Properties
let autoDispose: boolean;
let image: ImageValue;
let title: string;
let nullValue: null;
autoDispose = widget.autoDispose;
image = widget.image as ImageValue;
nullValue = widget.image as null;
title = widget.title;
widget.autoDispose = autoDispose;
widget.image = image;
widget.image = nullValue;
widget.title = title;
let properties: Properties<Page> = {autoDispose, image, title};
widget = new Page(properties);
widget.set(properties);
widget.appendTo(new NavigationView());
widget.insertBefore(new Page());
widget.insertAfter(new Page());
const siblings: WidgetCollection<Page|Action> = widget.siblings();
const actions: WidgetCollection<Action> = widget.siblings(Action);
const pages: WidgetCollection<Page> = widget.siblings(Page);
示例4: test_WidgetCollection
function test_WidgetCollection() {
var collection: WidgetCollection = page.find();
var length: number = collection.length;
var grandParents: WidgetCollection = collection.parent().parent();
var grandChildren: WidgetCollection = collection.children().children();
var found: WidgetCollection = collection.find().find(".class");
collection.appendTo(page);
collection.dispose();
}