CoreComponentInputSource.GotFocus 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当托管 XAML 元素获得焦点时引发。
// Register
event_token GotFocus(TypedEventHandler<IInspectable, CoreWindowEventArgs const&> const& handler) const;
// Revoke with event_token
void GotFocus(event_token const* cookie) const;
// Revoke with event_revoker
CoreComponentInputSource::GotFocus_revoker GotFocus(auto_revoke_t, TypedEventHandler<IInspectable, CoreWindowEventArgs const&> const& handler) const;
public event TypedEventHandler<object,CoreWindowEventArgs> GotFocus;
function onGotFocus(eventArgs) { /* Your code */ }
coreComponentInputSource.addEventListener("gotfocus", onGotFocus);
coreComponentInputSource.removeEventListener("gotfocus", onGotFocus);
- or -
coreComponentInputSource.ongotfocus = onGotFocus;
Public Custom Event GotFocus As TypedEventHandler(Of Object, CoreWindowEventArgs)