Page.ShowsNavigationUI Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit une valeur qui indique si l’interface utilisateur de navigation d’un NavigationWindow sur Microsoft Internet Explorer 6 est visible.
public:
property bool ShowsNavigationUI { bool get(); void set(bool value); };
public bool ShowsNavigationUI { get; set; }
member this.ShowsNavigationUI : bool with get, set
Public Property ShowsNavigationUI As Boolean
Valeur de propriété
true si l’interface utilisateur de navigation d’un hôte NavigationWindow est visible ; sinon, false.
Exceptions
La ShowsNavigationUI propriété est inspectée sur une Page instance qui n’est pas hébergée par un Window, NavigationWindowou un navigateur.
Exemples
L’exemple suivant montre comment utiliser XAML pour masquer l’interface utilisateur de navigation d’un 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;
}
}
}
Imports System.Windows
Imports System.Windows.Controls
Namespace VisualBasic
Partial Public Class HomePage
Inherits Page
Public Sub New()
InitializeComponent()
' Hide host's navigation UI
Me.ShowsNavigationUI = False
End Sub
End Class
End Namespace
Remarques
NavigationWindow affiche l’interface utilisateur de navigation par défaut pour activer la navigation vers l’avant et vers l’arrière du navigateur. Si une page est définie en tant que StartupUri, Application ouvre automatiquement une NavigationWindow page pour héberger la page. Si la page ne souhaite pas utiliser l’interface utilisateur de navigation par défaut NavigationWindow , elle peut être définie ShowsNavigationUI sur false.
Note
Étant donné que WPF ne s’intègre pas à l’interface utilisateur de navigation pour Microsoft Internet Explorer 6, elle fournit son propre interface utilisateur de navigation, qui peut être affichée ou masquée en définissant ShowsNavigationUI. WPF s’intègre à l’interface utilisateur de navigation Windows Internet Explorer 7. Par conséquent, la définition de ShowsNavigationUI sur les pages de Windows Internet Explorer 7 n’a aucun effet.