當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript page.Page類代碼示例

本文整理匯總了TypeScript中tns-core-modules/ui/page.Page的典型用法代碼示例。如果您正苦於以下問題:TypeScript Page類的具體用法?TypeScript Page怎麽用?TypeScript Page使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Page類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: Page

        create: () => {
            const page = new Page();
            page.content = stack;
            messageContainer.focus();
            page.style.fontSize = 11;
            if (platform.isAndroid) {
                page.on('navigatedTo', () => {
                    messageContainer.focus();
                    setTimeout(() => messageContainer.dismissSoftInput());
                });
            }

            return page;
        },
開發者ID:slavchev,項目名稱:NativeScript,代碼行數:14,代碼來源:testRunner.ts

示例2: createPage

export function createPage() {

    // https://github.com/NativeScript/cross-platform-modules/issues/61

    var stackPanel = new panelModule.StackLayout();
    stackPanel.id = "stackPanel";

    var btn = new button.Button();
    btn.text = "getViewById";

    var page = new pages.Page();
    page.content = stackPanel;
    page.getViewById<panelModule.StackLayout>("stackPanel").addChild(btn);

    return page;
}
開發者ID:NathanWalker,項目名稱:NativeScript,代碼行數:16,代碼來源:i61.ts

示例3: exectuteOnAll

function exectuteOnAll(page: Page, callback: (txt: TextView | TextField) => void) { 
    page.getViewById("container").eachChild((child) => {
        if(child instanceof TextView || child instanceof TextField) {
            callback(child);
        }
        return true;
    })
}
開發者ID:sitefinitysteve,項目名稱:NativeScript,代碼行數:8,代碼來源:hint-text-color.ts

示例4: createPage

export function createPage() {

    var stackLayout = new stackLayoutModule.StackLayout();
    var label = new labelModule.Label();
    label.text = "CONSOLE MODULE";
    var textView = new textViewModule.TextView();
    textView.text = "Check out the console output.";
    stackLayout.addChild(label);
    stackLayout.addChild(textView);

    var page = new pageModule.Page();
    page.on(pageModule.Page.loadedEvent, function () {
        pageLoaded();
    });

    page.content = stackLayout;
    return page;
}
開發者ID:NathanWalker,項目名稱:NativeScript,代碼行數:18,代碼來源:console.ts

示例5: waitUntilNavigatedTo

export function waitUntilNavigatedTo(page: Page, action: Function) {
    let completed = false;
    function navigatedTo(args) {
        args.object.page.off("navigatedTo", navigatedTo);
        completed = true;
    }

    page.on("navigatedTo", navigatedTo);
    action();
    TKUnit.waitUntilReady(() => completed, 5);
}
開發者ID:m-abs,項目名稱:NativeScript,代碼行數:11,代碼來源:helper.ts

示例6: constructor

    constructor(private page: Page) {
        if (this.page) {
            this.page.actionBarHidden = true;

            this.page.on("loaded", () => {
                if (this.pageRouterOutlet && this.page.frame) {
                    this.pageRouterOutlet.setActionBarVisibility(this.page.frame.actionBarVisibility);
                }
            });
        }
    }
開發者ID:NativeScript,項目名稱:nativescript-angular,代碼行數:11,代碼來源:ns-empty-outlet.component.ts

示例7: constructor

 constructor(private _page: Page, private _router: Router, private _optionsService: OptionsService) {
     super();
     if (applicationModule.ios) {
         this._page.on("navigatingTo", this.onNavigatingTo, this);
         this._optionsParamName = "selectionMode";
         this._optionsService.paramName = this._optionsParamName;
         this.router = _router;
         this.navigationParameters = { selectedIndex: 0, paramName: this._optionsParamName, items: ["None", "Single", "Multiple", "Range"] };
     }
     this._selectionMode = CalendarSelectionMode.None;
 }
開發者ID:telerik,項目名稱:nativescript-ui-samples-angular,代碼行數:11,代碼來源:calendar-selection-modes.component.ts

示例8: constructor

 constructor(private _page: Page,
     private _optionsService: OptionsService, private _router: Router) {
     super();
     if (applicationModule.ios) {
         this._page.on("navigatingTo", this.onNavigatingTo, this);
         this._optionsParamName = "eventsViewMode";
         this._optionsService.paramName = this._optionsParamName;
         this.router = _router;
         this.navigationParameters = { selectedIndex: 1, paramName: this._optionsParamName, items: ["Week", "Month", "Month names", "Year", "Day"] };
     }
     this._viewMode = CalendarViewMode.Month;
 }
開發者ID:telerik,項目名稱:nativescript-ui-samples-angular,代碼行數:12,代碼來源:calendar-view-modes.component.ts

示例9: constructor

 constructor(private _page: Page,
     private _optionsService: OptionsService, private _router: Router, private _changeDetectionRef: ChangeDetectorRef, private _dataService: DataService) {
     super();
     if (applicationModule.ios) {
         this._page.on("navigatingTo", this.onNavigatingTo, this);
         this._optionsParamName = "stackMode";
         this._optionsService.paramName = this._optionsParamName;
         this.router = _router;
         this._optionsItems = ["Stack", "Stack 100", "None"];
         this.navigationParameters = { selectedIndex: 1, paramName: this._optionsParamName, items: this._optionsItems };
     }
 }
開發者ID:haylahi,項目名稱:mobile-app,代碼行數:12,代碼來源:chart-series-stacked-bar.component.ts

示例10: constructor

 constructor(private _page: Page, private _calendarService: CalendarEventsService,
     private _optionsService: OptionsService, private _router: Router) {
     super();
     if (applicationModule.ios) {
         this._page.on("navigatingTo", this.onNavigatingTo, this);
         this._optionsParamName = "eventsViewMode";
         this._optionsService.paramName = this._optionsParamName;
         this.router = _router;
         this.navigationParameters = { selectedIndex: 0, paramName: this._optionsParamName, items: ["None", "Inline", "Popover (iPad only)"] };
     }
     this._eventsViewMode = CalendarEventsViewMode.None;
 }
開發者ID:telerik,項目名稱:nativescript-ui-samples-angular,代碼行數:12,代碼來源:calendar-events-view-modes.component.ts


注:本文中的tns-core-modules/ui/page.Page類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。