zoukankan      html  css  js  c++  java
  • Adapting to views using css or js

    using css

    @media screen and (-ms-view-state: fullscreen-landscape) {
    
    
    }
    @media screen and (-ms-view-state: fullscreen-portrait) {
    
    }
    @media screen and (-ms-view-state: filled) {
    
    
    }
    @media screen and (-ms-view-state: snapped) {
    
    }

    using js:

    (function () {
        "use strict";
        var app = WinJS.Application;
        var view = Windows.UI.ViewManagement;
        app.onactivated = function (eventObject) {
            var value = getMessageFromView(view.ApplicationView.value);
        };
        function getMessageFromView(currentView) {
            var displayMsg;
            switch (currentView) {
                case view.ApplicationViewState.filled:
    
                    displayMsg = "Filled View";
                    break;
                case view.ApplicationViewState.snapped:
                    displayMsg = "Snapped View";
                    break;
                case view.ApplicationViewState.fullScreenLandscape:
                    displayMsg = "Full - Landscape";
                    break;
                case view.ApplicationViewState.fullScreenPortrait:
                    displayMsg = "Full - Portrait";
                    break;
            }
            return displayMsg;
        }
        app.start();
    })();



  • 相关阅读:
    c/c++指针
    C++小思
    gvim-ide plugins
    Windows下文件的所有和权限
    C++枚举类型
    linux的cgroup控制
    linux的free命令
    linux下可以禁用的一些服务
    bat programming is easy and powerful
    c++类定义代码的分离
  • 原文地址:https://www.cnblogs.com/Mr-Joe/p/3193259.html
Copyright © 2011-2022 走看看