Frame..::.CanGoBack Property Home
.NET Framework Class Library for Silverlight
Frame..::.CanGoBack Property

[Note: This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets a value that indicates whether there is at least one entry in the back navigation history.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)
Syntax

'Usage

Dim instance As Frame
Dim value As Boolean

value = instance.CanGoBack


'Declaration

Public Property CanGoBack As Boolean
    Get
    Friend Set

Property Value

Type: System..::.Boolean
true if there is at least one entry in the back navigation history; otherwise, false.
Remarks

Dependency property identifier field: CanGoBackProperty

The GoBack method throws an InvalidOperationException exception if there are no entries in the back navigation history. To determine whether there is at least one entry in the back navigation history, check the value of the CanGoBack property.

Examples

The following example shows event handler code for buttons on a frame that allow forward and back navigation.

Private Sub BackNavButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    If (ContentFrame.CanGoBack) Then
        ContentFrame.GoBack()
    End If
End Sub

Private Sub ForwardNavButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    If (ContentFrame.CanGoForward) Then
        ContentFrame.GoForward()
    End If
End Sub


Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View