Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Page.ShowsNavigationUI Property

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

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public bool ShowsNavigationUI { get; set; }
/** @property */
public boolean get_ShowsNavigationUI ()

/** @property */
public void set_ShowsNavigationUI (boolean value)

public function get ShowsNavigationUI () : boolean

public function set ShowsNavigationUI (value : boolean)

<object ShowsNavigationUI="bool" .../>

Property Value

A Boolean value that is true when the navigation UI of a host NavigationWindow is visible; otherwise, false.

Exception typeCondition

InvalidOperationException

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

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.

NoteNote:

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.

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

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

	...

</Page>

<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"
    >

	...

</Page>

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;
        }
    }
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft