I'm building a Windows 10 app using Cordova and want to add Settings menu content, which can be found when clicking the 'hamburger' icon at the top-left. How/where to do this?
You have to use a WinRT API :
var settingsPane = Windows.UI.ApplicationSettings.SettingsPane.getForCurrentView();
function commandsRequested(e) {
var applicationCommands = e.request.applicationCommands;
var command1 = new Windows.UI.ApplicationSettings.SettingsCommand('<commandId1>', '<Title>', function () {
// do something...
});
applicationCommands.append(command1);
}
settingsPane.addEventListener("commandsrequested", commandsRequested);
You can execute this code in the DeviceReady handler and include it in a merge script for windows platform, in a custom plugin or just use a condition like following :
if (cordova !== undefined && cordova.platformId === "windows" && Windows) {