Nasıl yapılır: sayfaya gitme
Bu örnekte, bir sayfaya bir sayfa üzerinden gidilebileceği çeşitli yollar gösterilmektedir NavigationWindow .
Örnek
NavigationWindowAşağıdakilerden birini kullanarak bir sayfaya gitmek mümkündür:
// 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())
Not
Tekdüzen Kaynak tanımlayıcıları (URI 'Ler) göreli veya mutlak olabilir. Daha fazla bilgi için bkz. WPF 'de paket URI 'leri.