Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 2.49 KB

frame_navigatetotype_1537292032.md

File metadata and controls

43 lines (25 loc) · 2.49 KB
-api-id -api-type
M:Microsoft.UI.Xaml.Controls.Frame.NavigateToType(Windows.UI.Xaml.Interop.TypeName,System.Object,Microsoft.UI.Xaml.Navigation.FrameNavigationOptions)
winrt method

Microsoft.UI.Xaml.Controls.Frame.NavigateToType

-description

Causes the Frame to load content represented by the specified Page, also passing a parameter to be interpreted by the target of the navigation.

-parameters

-param sourcePageType

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++).

-param parameter

The navigation parameter to pass to the target page.

-param navigationOptions

Options for the navigation, including whether it is recorded in the navigation stack and what transition animation is used.

-returns

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.

-see-also

-examples