Frame.Source Property

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

C#
[System.ComponentModel.Bindable(true)]
public Uri Source { get; set; }

Property Value

Uri

A Uri that contains the URI for the current content, or the content that is currently being navigated to.

Attributes

Examples

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

C#
// Navigate to URI using the Source property
this.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

Item Value
Identifier field SourceProperty
Metadata properties set to true Journal

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10