Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example illustrates several ways in which a page can be navigated to from a NavigationWindow.
Example
It is possible for a NavigationWindow to navigate to a page using one of the following:
// Navigate to URI using the Source property
this.Source = new Uri("HomePage.xaml", UriKind.Relative);
// Navigate to URI using the Navigate method
this.Navigate(new Uri("HomePage.xaml", UriKind.Relative));
// Navigate to object using the Navigate method
this.Navigate(new HomePage());
' Navigate to URI using the Source property
Me.Source = New Uri("HomePage.xaml", UriKind.Relative)
' Navigate to URI using the Navigate method
Me.Navigate(New Uri("HomePage.xaml", UriKind.Relative))
' Navigate to object using the Navigate method
Me.Navigate(New HomePage())
Note
Uniform resource identifiers (URIs) can be either relative or absolute. For more information, see Pack URIs in WPF.
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET Desktop feedback