Frame.NavigateToType(TypeName, Object, FrameNavigationOptions) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
bool NavigateToType(TypeName const& sourcePageType, IInspectable const& parameter, FrameNavigationOptions const& navigationOptions);
public bool NavigateToType(System.Type sourcePageType, object parameter, FrameNavigationOptions navigationOptions);
function navigateToType(sourcePageType, parameter, navigationOptions)
Public Function NavigateToType (sourcePageType As Type, parameter As Object, navigationOptions As FrameNavigationOptions) As Boolean
Parameters
The page to navigate to, specified as a type reference to its partial class type. (A type reference is given as System.Type for Microsoft .NET, or a TypeName helper struct for C++).
- parameter
-
Object
IInspectable
The navigation parameter to pass to the target page.
- navigationOptions
- FrameNavigationOptions
Options for the navigation, including whether it is recorded in the navigation stack and what transition animation is used.
Returns
bool
false
if a NavigationFailed event handler has set Handled to true
; otherwise, true
.
Remarks
You 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 Microsoft .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 Microsoft Visual Basic, use GetType
. If you're using C++/WinRT you can use the winrt::xaml_typename<T>()
helper function to create a TypeName
object. See winrt::xaml_typename function template for more details, and a code example.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for