1

WinJS Windows 8 Metro アプリケーションの新しい/カスタム設定オプションを作成しようとしましたが、表示されないようです。ここの提案に従ってみましたが、どこにも行きませんでした。すべてを初期化するために使用している JS を次に示します。チャーム バーに「Manage Cache」が表示されますが、クリックすると閉じます。

WinJS.UI.processAll();
WinJS.Application.onsettings = function (e) {
    e.detail.applicationcommands = {
        "managecache": { title: "Manage Cache", href: "/html/manageCacheCharm.html" }
    };
    WinJS.UI.SettingsFlyout.populateSettings(e);
};
WinJS.Application.start();

html の本文は次のとおりです。

<div data-win-control="WinJS.UI.SettingsFlyout" aria-label="Manage cache flyout" data-win-options="{settingsCommandId:'managecache', width: 'narrow'}">
<!-- Use either 'win-ui-light' or 'win-ui-dark' depending on the contrast between the header title and background color -->
<div class="win-ui-dark win-header" style="background-color:#2d6c61">
    <!-- Background color reflects app's personality -->
    <button type="button" id="backButton" class="win-backbutton"></button>
    <div class="win-label">Manage Cache</div>
</div>
<div class="win-content ">
    <div class="win-settings-section">
        <h3>Email App Cache</h3>
        <p>Email the app cache to send an administrator to help diagnose checklist issues.</p>
        <p><button id="sendAppCacheButton" onclick="sendAppCache()">Email cache to Admin</button></p>
        <p id="sendCacheResult"></p>

        <h3>Clear App Cache</h3>
        <p>Clear the app cache if you are experiencing issues. Unsynced changes will be lost.</p>
        <p><button id="clearAppCacheButton" onclick="clearAppCache()">Clear app cache</button></p>
        <p id="clearCacheResult"></p>
    </div>
</div>

すべてが順調に進んでいるように見えます... 何か提案はありますか? ありがとう!

4

0 に答える 0