I have been looking through a bunch of sample code online but haven't been able to find an example that addresses what I'm trying to do, so I figured I would ask here.
I want to show the Settings pane and subscribe for the "beforehide" event but I don't know how to do it. I understand that WinJS.UI.SettingsFlyout.show() and that WinJS.UI.SettingsFLyout.addEventListener is not static. So it seems like I have
to instantiate a WinJS.UI.SettingsFlyout, subscribe to the "beforehide" event, then show it. However, my attempts to do this have been successful. Here is my latest draft that does not work:
var settingsFlyout = new WinJS.UI.SettingsFlyout(document.createElement(document.uniqueID), {});
settingsFlyout.show();
settingsFlyout.addEventListener("beforehide", function (e) {
// Etc...
});