Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Page Class
Page Properties
 ShowsNavigationUI Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Page..::.ShowsNavigationUI Property

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

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
Visual Basic (Declaration)
Public Property ShowsNavigationUI As Boolean
Visual Basic (Usage)
Dim instance As Page
Dim value As Boolean

value = instance.ShowsNavigationUI

instance.ShowsNavigationUI = value
C#
public bool ShowsNavigationUI { get; set; }
Visual C++
public:
property bool ShowsNavigationUI {
    bool get ();
    void set (bool value);
}
JScript
public function get ShowsNavigationUI () : boolean
public function set ShowsNavigationUI (value : boolean)
XAML Attribute Usage
<object ShowsNavigationUI="bool" .../>

Property Value

Type: System..::.Boolean
true if the navigation UI of a host NavigationWindow is visible; otherwise, false.
ExceptionCondition
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.

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


...


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


...


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker