Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make an App Bar over an iFrame?
    text
    copied!<p>I am playing around some windows 8 stuff and wonder how I can do the following in a windows 8 app.</p> <ol> <li>Display a web page.</li> <li>Implement a metro style app bar over the web page. </li> </ol> <p>Here is my default.html:</p> <pre><code>&lt;body role="application"&gt; &lt;div style="z-index:2;"&gt; &lt;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}" &gt; &lt;div class="win-right"&gt; &lt;button onclick="sdkSample.displayStatus('Add button pressed')" class="win-command"&gt; &lt;span class="win-commandicon win-large iconAdd"&gt;&lt;/span&gt; &lt;span class="win-label"&gt;Add to Menu_1&lt;/span&gt; &lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="z-index:0;"&gt; &lt;div data-win-control="WinJS.UI.ViewBox"&gt; &lt;div&gt; &lt;!-- taking Apple.com as an example --&gt; &lt;iframe class="fullscreen" src="http://apple.com" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>And here is my css for "fullscreen"</p> <pre><code>.fullscreen { display:block; position:fixed; top:0; left:0; width:100%; height:80%; /* leave 20% white space to right click to toggle App Bar */ } </code></pre> <p>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.</p> <p>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.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload