zoukankan      html  css  js  c++  java
  • windows8 应用工具菜单栏

    应用程序栏例子
    这个示例演示了如何使用这个应用程序栏呈现导航,命令,和工具,用户。
    样品采用WinJS.UI。 可以和WinJS.UI。 AppBarCommand类。
    这个应用程序栏被默认和出现在用户即可手指从顶部或底部屏幕的边缘。它涵盖的内容可以被应用程序和用户提供了一个边刷,或作用,应用程序。确切地说,该演示了如何添加一个应用程序栏,自定义应用程序栏,和控制应用程序栏。
    这个简单的写在HTML,CSS和JavaScript。 XAML的版本,看到XAML应用程序栏控制例子。
    (function () {
        "use strict";
        var page = WinJS.UI.Pages.define("/html/scenario1.html", {
            ready: function (element, options) {
                document.getElementById("s1cmdAdd").addEventListener("click", doClickAdd, false);
                document.getElementById("s1cmdRemove").addEventListener("click", doClickRemove, false);
                document.getElementById("s1cmdDelete").addEventListener("click", doClickDelete, false);
                document.getElementById("s1cmdCamera").addEventListener("click", doClickCamera, false);
                WinJS.log && WinJS.log("To show the bar, swipe up from the bottom of the screen, right-click, or press Windows Logo + z. To dismiss the bar, tap in the application, swipe, right-click, or press Windows Logo + z again.", "sample", "status");
            },
            unload: function () {
                AppBarSampleUtils.removeAppBars();
            }
        });

        // Command button functions
        function doClickAdd() {
            WinJS.log && WinJS.log("Add button pressed", "sample", "status");
        }

        function doClickRemove() {
            WinJS.log && WinJS.log("Remove button pressed", "sample", "status");
        }

        function doClickDelete() {
            WinJS.log && WinJS.log("Delete button pressed", "sample", "status");
        }

        function doClickCamera() {
            WinJS.log && WinJS.log("Camera button pressed", "sample", "status");
        }

    })();

    完整实例

    /Files/risk/windows8/应用工具菜单栏sample.rar 

  • 相关阅读:
    ORACLE字符集基础知识
    Outlook 2013 在邮件里面点击超链接时弹出“组织策略阻止我们为您完成此操作”
    Apache Kafka: 优化部署的10个最佳实践
    经济学人使用Golang构建微服务历程回顾
    如何做自己的服务监控?spring boot 2.x服务监控揭秘
    web框架的前生今世--从servlet到spring mvc到spring boot
    如何做自己的服务监控?spring boot 1.x服务监控揭秘
    手机上不了网
    Cross-Browser, Event-based, Element Resize Detection(转)
    迷你MVVM框架 avalonjs 组件编写指南
  • 原文地址:https://www.cnblogs.com/risk/p/2494718.html
Copyright © 2011-2022 走看看