I've tried to create a new/custom settings option for my WinJS Windows 8 Metro application and it just won't seem to show up. I tried following the suggestions here and didn't get anywhere. Here is the JS I am using to intialize everything, and I am seeing "Manage Cache" in the charm bar, but clicking it just closes it:
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();
Here is the body of the 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>
Everything looks to be in order...any suggestions? Thanks!