0

メトロアプリで設定パネルを作りたいです。

次のような 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>

このコードを使用して、ポップウィンドウを表示します

   _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 のような sth を設定する関数またはプロパティが見つかりません。

どうすれば正しくできますか?

4

1 に答える 1

1

WebViewは常に最上位の位置を占めるため、この動作は仕様によるものです。推奨される解決策は、ポップアップ時に を非表示にするか、ポップアップが表示されたときに をプレースホルダーとしてWebView使用することです。WebViewBrush

ウェブ上にはたくさんのチュートリアルがありますが、個人的には次の記事をお勧めします: WebView の上にチャームを表示する方法

于 2013-03-25T17:02:59.433 に答える