WebBrowser.CanGoBack 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 une valeur qui indique s’il existe un document vers lequel revenir.
public:
property bool CanGoBack { bool get(); };
public bool CanGoBack { get; }
member this.CanGoBack : bool
Public ReadOnly Property CanGoBack As Boolean
Valeur de propriété
Valeur Boolean qui indique s’il existe un document vers lequel revenir.
Exemples
L’exemple suivant montre comment revenir au document précédent en appelant GoBack. L’exemple vérifie d’abord qu’il existe des documents à revenir en vérifiant CanGoBack.
private void backButton_Click(object sender, RoutedEventArgs e)
{
// Navigate to the previous HTML document, if there is one
if (this.webBrowser.CanGoBack)
{
this.webBrowser.GoBack();
}
}