NavigationService.Source 属性

定义

获取或设置当前内容的 URI,或当前正在导航到的新内容的 URI。Gets or sets the 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

属性值

Uri

一个 Uri,其中包含当前内容的 URI 或当前正在导航到的内容。A Uri that contains the URI for the current content, or the content that is currently being navigated to.

注解

如果将此属性设置为与当前所显示的 URI 不同的 URI,导航器(NavigationWindowFrame)将导航到指定的 URI。If you set this property to a different URI than the one currently being displayed, the navigator (NavigationWindow, Frame) navigates to the specified URI.

如果取消了导航,则将 Source 设置为从导航到的 URI 加载的内容。Source is set to the content that is loaded from the URI that is navigated to, unless the navigation is canceled.

可以使用只包含片段的 URI 设置 Source,并且可以将其设置为 nullSource can be set with a fragment-only URI, and can be set to null.

适用于