Massimo Variolo
Massimo Variolo

Reputation: 4777

Webview always on top (Metro app)

I've noticed that whenever you have a WebView on your screen, it will be the top-most element of the UI. Is there a way to set a z-index?

Upvotes: 1

Views: 1565

Answers (2)

Antonio Bakula
Antonio Bakula

Reputation: 20693

There is no way to set z-index or anything similar, WebView is always on top of the XAML ("Airspace" issue). You have to hide web view if new content completely hides WebView or use WebViewBrush control.

http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx#AN2

http://blogs.msdn.com/b/priozersk/archive/2012/08/13/how-to-display-charms-on-a-top-of-the-webview.aspx

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.webviewbrush.aspx

Upvotes: 2

foson
foson

Reputation: 10227

From https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.webview.aspx:

Note The "airspace problem" has been fixed starting with Windows 8.1.

Upvotes: 0

Related Questions