Exporter (0) Imprimer
Développer tout

HyperlinkButton.NavigateUri Property

Silverlight

Gets or sets the URI to navigate to when the HyperlinkButton is clicked.

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

[TypeConverterAttribute(typeof(UriTypeConverter))]
public Uri NavigateUri { get; set; }
<HyperlinkButton NavigateUri="uriString"/>

Property Value

Type: System.Uri
The URI to navigate to when the HyperlinkButton is clicked.

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.

NoteNote:

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 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"/>


Silverlight

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.

Ajouts de la communauté

AJOUTER
Microsoft réalise une enquête en ligne pour recueillir votre opinion sur le site Web de MSDN. Si vous choisissez d’y participer, cette enquête en ligne vous sera présentée lorsque vous quitterez le site Web de MSDN.

Si vous souhaitez y participer,
Afficher:
© 2014 Microsoft