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 HyperlinkButton
s appear:
<
Get XAML Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.