Share via


ContentLink.GotFocus 事件

定義

發生于連結收到焦點時。

// Register
event_token GotFocus(RoutedEventHandler const& handler) const;

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

// Revoke with event_revoker
ContentLink::GotFocus_revoker GotFocus(auto_revoke_t, RoutedEventHandler const& handler) const;
public event RoutedEventHandler GotFocus;
function onGotFocus(eventArgs) { /* Your code */ }
contentLink.addEventListener("gotfocus", onGotFocus);
contentLink.removeEventListener("gotfocus", onGotFocus);
- or -
contentLink.ongotfocus = onGotFocus;
Public Custom Event GotFocus As RoutedEventHandler 

事件類型

備註

重要

此 API 支援內容連結。 Windows 10 版本 1903 之後的 Windows 版本中不提供啟用內容連結的 Windows 功能。 XAML 文字控制項的內容連結在版本 1903 之後將無法運作。

如需詳細資訊,請參閱 UIElement.GotFocus

適用於