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();
    })();



  • 相关阅读:
    terminator shortcut
    支付宝集成错误
    null与DBNULL
    linode接连出问题,我也没看懂英文
    ruby 日期 好函数
    ruby datetime
    act as tree插件
    ruby 时间
    ruby规则引擎
    on ,type等关键词,使用
  • 原文地址:https://www.cnblogs.com/Mr-Joe/p/3193259.html
Copyright © 2011-2022 走看看