NavigationWindow.Source 屬性

定義

取得或設定目前內容的統一資源識別項 (URI),或目前正在巡覽之新內容的 URI。

public:
 property Uri ^ Source { Uri ^ get(); void set(Uri ^ value); };
public Uri Source { get; set; }
member this.Source : Uri with get, set
Public Property Source As Uri

屬性值

Uri

目前內容的 URI,或目前正在流覽的內容。

範例

下列範例示範如何藉由設定 Source 屬性,流覽至統一資源識別項 (URI) 。

// Navigate to URI using the Source property
this.Source = new Uri("HomePage.xaml", UriKind.Relative);
' Navigate to URI using the Source property
Me.Source = New Uri("HomePage.xaml", UriKind.Relative)

備註

請參閱 NavigationService.Source

注意

統一資源識別項 (URI) 可以是相對或絕對。 如需詳細資訊,請參閱 WPF 中的 Pack URI

相依性屬性資訊

識別碼欄位 Source
設定為 的中繼資料屬性 true Journal

適用於