Webview always on top (Metro app)

时光总嘲笑我的痴心妄想 提交于 2019-12-11 06:24:11

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/14564007/webview-always-on-top-metro-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!