Megosztás a következőn keresztül:


Hyperlink.Click Event

Definition

Occurs when the Hyperlink is clicked.

// Register
event_token Click(TypedEventHandler<Hyperlink, HyperlinkClickEventArgs const&> const& handler) const;

// Revoke with event_token
void Click(event_token const* cookie) const;

// Revoke with event_revoker
Hyperlink::Click_revoker Click(auto_revoke_t, TypedEventHandler<Hyperlink, HyperlinkClickEventArgs const&> const& handler) const;
public event TypedEventHandler<Hyperlink,HyperlinkClickEventArgs> Click;
function onClick(eventArgs) { /* Your code */ }
hyperlink.addEventListener("click", onClick);
hyperlink.removeEventListener("click", onClick);
- or -
hyperlink.onclick = onClick;
Public Custom Event Click As TypedEventHandler(Of Hyperlink, HyperlinkClickEventArgs) 
<Hyperlink Click="eventhandler"/>

Event Type

Remarks

The Click event is intended for navigation within the app, or actions other than launching a URI in a browser. For example, if you want a new app page to load rather than opening a browser, or if you want to load the URI specifically within a WebView control, you handle the Click event and write code to perform the actions you want. You don't typically handle Click as well as specifying a NavigateUri value, these represent two different ways of using the Hyperlink element. If your intent is to open the URI in the default browser, and you have specified a value for NavigateUri, don't handle Click. Conversely, if you have code for the Click event, don't specify a NavigateUri.

Applies to

See also