共用方式為


HOW TO:巡覽至頁面

更新:2007 年 11 月

本範例說明可以從 NavigationWindow 巡覽至頁面的幾種方法。

範例

NavigationWindow 可以使用下列其中一項功能,巡覽至頁面:

// 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());
注意事項:

統一資源識別元 (URI) 可以是相對的,也可以是絕對的。如需詳細資訊,請參閱 Windows Presentation Foundation 中的 Pack URI

請參閱

參考

Frame

Page

NavigationService