O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HyperlinkButton

HyperlinkButton acts much like a hyperlink in HTML. It is similar to Button, but with a different default appearance and one more property: NavigateUri. This is the analog to the AREA (A) element’s href attribute in HTML. You can set it to a URL, and when a user clicks the button, it automatically launches the appropriate app to act upon the content.

Although HyperlinkButton has a Click event (inherited from ButtonBase), there’s no need to handle it thanks to its built-in behavior. If you want to perform a custom action, however, you could certainly leave NavigateUri’s value unset and perform that action inside a Click handler.

Figure 9.2 shows how the following three HyperlinkButtons appear:

<

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required