本文整理匯總了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();
}