Share via


Frame.CanGoBack Property

Definition

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

public:
 property bool CanGoBack { bool get(); };
bool CanGoBack();
public bool CanGoBack { get; }
var boolean = frame.canGoBack;
Public ReadOnly Property CanGoBack As Boolean

Property Value

Boolean

bool

true if there is at least one entry in back navigation history; false if there are no entries in back navigation history or the Frame does not own its own navigation history.

Examples

if (contentFrame.CanGoBack)
{
    contentFrame.GoBack();
}

Remarks

You should check that the CanGoBack property is true before you call GoBack. If you call GoBack while CanGoBack is false, an exception is thrown.

Applies to

See also