I have a very simple app. I started with the WinJS App (Universal Windows) template in VS2015. I have a split view and inside the split view content section I have a menu. The menu appears when the control button is clicked but none of the options are selectable.
<div data-win-control="WinJS.UI.SplitView" data-win-options="{closedDisplayMode: 'overlay',panePlacement:'left'}">
<div class="win-splitview-pane">
</div>
<div class="win-splitview-content">
<button id="selectionButton">Selection</button>
<div id="selectionMenu" data-win-control="WinJS.UI.Menu">
<button data-win-options="{label:'Forward',type:'toggle'}" data-win-control="WinJS.UI.MenuCommand"></button>
<button data-win-options="{label:'Reply',type:'toggle'}" data-win-control="WinJS.UI.MenuCommand"></button>
<button data-win-options="{label:'Reply All',type:'toggle'}" data-win-control="WinJS.UI.MenuCommand"></button>
</div>
</div>
</div>
The JavaScript code for this is simple (initSelection
is called in the app.onactivated
section):
function initSelection() {
document.getElementById("selectionButton").addEventListener("click", showFlyout, false);
}
function showFlyout() {
document.getElementById("selectionMenu").winControl.show(document.getElementById("selectionButton"), "bottom", "left");
}
Is this even possible? How? thank you in advance.