iframe中嵌套.xbap文件,去掉上部导航栏

当我们在iframe标签中嵌套一个.xbap的时候,页面上部会显示出一个导航栏,如何去掉它呢?

有两种方式:

(1)我们可以加在xaml中:

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="HomePage"
    ShowsNavigationUI="False"
>

(2)也可以加在后台代码中:

using System;
using System.Windows;
using System.Windows.Controls;

namespace CSharp
{
    public partial class HomePage : Page
    {
        public HomePage()
        {
            InitializeComponent();

            // Hide host's navigation UI
            this.ShowsNavigationUI = false;
        }
    }
}

亲测有效,棒,棒,棒!

原文地址:https://www.cnblogs.com/kimiGuo/p/7123016.html