この例では、NavigationWindow を使用してページに移動するいくつかの方法を示します。
使用例
NavigationWindow では、次のいずれかを使用して、ページに移動することができます。
' 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())
// 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());
![]() |
---|
Uniform resource identifiers (URIs) には、相対 URI も絶対 URI もどちらも指定できます。詳細については、「WPF におけるパッケージの URI」を参照してください。 |