Frame.Navigate(TypeName) method

Applies to Windows and Windows Phone

Causes the Frame to load content represented by the specified Page.

Syntax

Public Function Navigate(
  sourcePageType As Type 
) As Boolean

Parameters

sourcePageType

Type: System.Type [.NET] | TypeName [C++]

The page to navigate to, specified as a type reference to its partial class type. (A type reference is given as System.Type for .NET, or a TypeName helper struct for C++/CX).

Return value

Type: System.Boolean [.NET] | Platform::Boolean [C++]

false if a NavigationFailed event handler has set Handled to true; otherwise, true. See Remarks for more info.

Remarks

Currently, you must handle the NavigationFailed event to respond to navigation failure. You can handle the failure directly in the event handler, or you can set the NavigationFailedEventArgs.Handled property to true and use the Navigate method return value to respond to the failure.

Tip  If you are programming using a .NET language (C# or Microsoft Visual Basic), the TypeName type projects as System.Type. When programming using C#, it is common to use the typeof operator to get references to the System.Type of a type. In Visual Basic, use GetType. If you're using C++/CX, where you'll need to create a TypeName helper struct, you can use the typeid component extension.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Frame
Page
Navigate(Type, Object)
NavigationFailed
Quickstart: Navigating between pages
XAML Navigation sample

 

 

Show:
© 2014 Microsoft