HyperlinkButton.NavigateUri Property
Gets or sets the URI to navigate to when the HyperlinkButton is clicked.
Namespace: System.Windows.Controls
Assembly: System.Windows (in System.Windows.dll)
Dependency property identifier field: NavigateUriProperty
The specified URI must be an absolute URI or an application-relative URI.
When you use a relative URI, the Silverlight-based application must discover its application root at run time, and the application root can vary between development and production environments. The application root is required for the application to build an absolute URI from a relative URI. For more information about relative and absolute URIs, see Uri.
Note: |
|---|
If EnableNavigation (Silverlight Plug-in Object)on the Silverlight object is set to none, the user can only navigate to a relative URI in the current application. Attempts to navigate to an external URL will cause a SecurityException. |
Version Notes
Silverlight for Windows Phone
In Silverlight for Windows Phone applications, you must specify a TargetName value for the application to properly navigate to the URI specified by NavigateUri.
The following code example demonstrates a HyperlinkButton.
<HyperlinkButton Content="Click here to learn about Silverlight" NavigateUri="http://www.silverlight.net" TargetName="_blank" Margin="10,60,0,0"/>
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Note: