次の方法で共有


方法 : ページに移動する

この例では、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」を参照してください。

参照

参照

Frame

Page

NavigationService