Page.ShowsNavigationUI Property

Definition

Gets or sets a value that indicates whether the navigation UI of a NavigationWindow on Microsoft Internet Explorer 6 is visible.

C#
public bool ShowsNavigationUI { get; set; }

Property Value

true if the navigation UI of a host NavigationWindow is visible; otherwise, false.

Exceptions

The ShowsNavigationUI property is inspected on a Page instance that is not hosted by a Window, NavigationWindow, or a browser.

Examples

The following example shows how to use XAML to hide the navigation UI of a NavigationWindow.

XAML
<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="HomePage"
    ShowsNavigationUI="False"
    >
XAML
</Page>
XAML
<Page 
    x:Class="CSharp.HomePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="HomePage"
    >
XAML
</Page>
C#
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;
        }
    }
}

Remarks

NavigationWindow displays navigation UI by default to enable browser-style forwards and backwards navigation. If a page is set as the StartupUri, Application automatically opens a NavigationWindow to host the page in. If the page does not want to use the default NavigationWindow navigation UI, it can set ShowsNavigationUI to false.

Poznámka

Because WPF does not integrate with the navigation UI for Microsoft Internet Explorer 6, it provides its own navigation UI, which can be shown or hidden by setting ShowsNavigationUI. WPF does integrate with the Windows Internet Explorer 7 navigation UI, so setting ShowsNavigationUI on pages in Windows Internet Explorer 7 has no effect.

Applies to

Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10