我想在我的 Metro 应用程序中制作一个设置面板。
我添加了一个带有 webview 的主页,如下所示:
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="App.MainPage"
mc:Ignorable="d">
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<WebView x:Name="MainWebView"/>
</Grid>
并使用此代码显示我的 popip 窗口
_settingsPopup = new Popup();
_settingsPopup.Closed += OnPopupClosed;
Window.Current.Activated += OnWindowActivated;
_settingsPopup.IsLightDismissEnabled = true;
_settingsPopup.Width = _settingsWidth;
_settingsPopup.Height = _windowBounds.Height;
SettingsPanel mypane = new SettingsPanel();
mypane.Width = _settingsWidth;
mypane.Height = _windowBounds.Height;
_settingsPopup.Child = mypane;
_settingsPopup.SetValue(Canvas.LeftProperty, _windowBounds.Width - _settingsWidth);
_settingsPopup.SetValue(Canvas.TopProperty, 0);
_settingsPopup.IsOpen = true;
但是,最后弹出窗口无法显示,当我将 webview 设置为隐藏时,我发现 webview 后面的弹出窗口。
我找不到任何函数或属性来设置 zindex 或 zindex 之类的东西来帮助我将弹出窗口放在前面。
我怎样才能使它正确?