Export (0) Print
Expand All

How to: Navigate to a Page

This example illustrates several ways in which a page can be navigated to from a NavigationWindow.

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());
NoteNote:

Uniform resource identifiers (URIs) can be either relative or absolute. For more information, see Pack URIs in Windows Presentation Foundation.

Community Additions

ADD
Show:
© 2014 Microsoft