NavigatingCancelEventArgs.Uri Property

Gets the uniform resource identifier (URI) for the content that is being navigated to.

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

public Uri Uri { get; private set; }

Property Value

Type: System.Uri
A value that represents the URI for the content.

The following example shows how to override the OnNavigatingFrom method and use the NavigatingCancelEventArgs object to determine if a child window is displayed.

public partial class About : Page
    public About()

    protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        if (e.Uri.ToString().Contains("/Home"))
            SurveyWindow surveyChildWindow = new SurveyWindow();




Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions