Webview always on top (Metro app)

2019-08-04 06:26发布

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?

2条回答
走好不送
2楼-- · 2019-08-04 06:54

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

查看更多
女痞
3楼-- · 2019-08-04 07:06

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.

查看更多
登录 后发表回答