Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NavigationWindow.Source Property


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

Namespace:   System.Windows.Navigation
Assembly:  PresentationFramework (in PresentationFramework.dll)

public Uri Source { get; set; }

Property Value

Type: System.Uri

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

See NavigationService.Source.


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

Identifier field


Metadata properties set to true


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

.NET Framework
Available since 3.0
Return to top
© 2017 Microsoft