XAML Hyperlink

A hyperlink is used to navigate to a file or URL on a specified location. This article shows how to use Hyperlink button in XAML.
  • 4289
The <Hyperlink /> element of XAML represents a hyperlink button. A hyperlink button can be used to navigate to a web site URL or a file.

The following code creates a hyperlink.

<Window xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005">
 
<HyperLink NavigateUri="http://www.longhorncorner.com">
 Longhorn Corner
</HyperLink>

</Window>

You can also hyperlink an image. The following code hyperlinks an image.

<HyperLink NavigateUri="http://www.longhorncorner.com">
  <Image Source="C:\butterfly.jpg"/>
 </HyperLink>

 

Further Readings
 
You may also want to read these related articles.
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 
© 2020 DotNetHeaven. All rights reserved.