WebBrowser.CanGoBack Propiedad

Definición

Obtiene un valor que indica si hay un documento anterior al que navegar.

public:
 property bool CanGoBack { bool get(); };
public bool CanGoBack { get; }
member this.CanGoBack : bool
Public ReadOnly Property CanGoBack As Boolean

Valor de propiedad

Valor Boolean que indica si hay un documento anterior al que navegar.

Ejemplos

En el ejemplo siguiente se muestra cómo volver al documento anterior llamando a GoBack. En primer lugar, el ejemplo comprueba que hay documentos a los que volver; para ello, compruebe 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();  
  }  
}  

Se aplica a

Consulte también