I am playing around some windows 8 stuff and wonder how I can do the following in a windows 8 app.
Here is my default.html:
<body role="application">
<div style="z-index:2;">
<div id="standardAppBar" data-win-control="WinJS.UI.AppBar" disabled="false" aria-label="Command Bar"
data-win-options="{position:'bottom',transient:true,autoHide:0,lightDismiss:true}" >
<div class="win-right">
<button onclick="sdkSample.displayStatus('Add button pressed')" class="win-command">
<span class="win-commandicon win-large iconAdd"></span>
<span class="win-label">Add to Menu_1</span>
</button>
</div>
</div>
</div>
<div style="z-index:0;">
<div data-win-control="WinJS.UI.ViewBox">
<div>
<!-- taking Apple.com as an example -->
<iframe class="fullscreen" src="http://apple.com" />
</div>
</div>
</div>
</body>
And here is my css for "fullscreen"
.fullscreen {
display:block;
position:fixed;
top:0;
left:0;
width:100%;
height:80%; /* leave 20% white space to right click to toggle App Bar */
}
Usually, the App bar can be toggled by right-click. But in the above code, right click doesn't work on the iFrame. So I had to leave a 20% white space for me to click on to toggle the white space. But I really want to make it to be fullscreen. Anyone? Thank you very much.
Note: If you are on a touch device, the App Bar can actually be toggled by swiping your finger from the outside of the screen to inside of the screen. So that works just fine. But not for right-click. So this post is asking right click option. Thank you very much in advance.
Answered by Microsoft fellows.. Reposting it here...
The idea is add a div over the iframe. Need to make sure the div has a transparent background and the div is "above" the iframe.