Редактиране

Споделяне чрез


NavigationWindow.Source Property

Definition

Gets or sets the uniform resource identifier (URI) of the current content, or the URI of new content that is currently being navigated to.

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

Property Value

Uri

The URI for the current content, or the content that is currently being navigated to.

Examples

The following example shows how to navigate to a uniform resource identifier (URI) by setting the Source property.

// 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)

Remarks

See NavigationService.Source.

Note

Uniform resource identifiers (URIs) can be either relative or absolute. For more information, see Pack URIs in WPF.

Dependency Property Information

Identifier field Source
Metadata properties set to true Journal

Applies to