DesktopWindowXamlSource.GotFocus 이벤트

정의

데스크톱 애플리케이션에서 포커스를 DesktopWindowXamlSource 가져오면 발생합니다(예: 포커스가 DesktopWindowXamlSource 바로 앞의 요소에 있는 동안 사용자가 Tab 키를 누름).

// Register
event_token GotFocus(TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceGotFocusEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
DesktopWindowXamlSource::GotFocus_revoker GotFocus(auto_revoke_t, TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceGotFocusEventArgs const&> const& handler) const;
public event TypedEventHandler<DesktopWindowXamlSource,DesktopWindowXamlSourceGotFocusEventArgs> GotFocus;
function onGotFocus(eventArgs) { /* Your code */ }
desktopWindowXamlSource.addEventListener("gotfocus", onGotFocus);
desktopWindowXamlSource.removeEventListener("gotfocus", onGotFocus);
- or -
desktopWindowXamlSource.ongotfocus = onGotFocus;
Public Custom Event GotFocus As TypedEventHandler(Of DesktopWindowXamlSource, DesktopWindowXamlSourceGotFocusEventArgs) 

이벤트 유형

TypedEventHandler<DesktopWindowXamlSource,DesktopWindowXamlSourceGotFocusEventArgs>

설명

DesktopWindowXamlSource 를 데스크톱 애플리케이션에 추가하는 경우 기본적으로 DesktopWindowXamlSourceTab 또는 화살표 키와 같은 키보드 이벤트를 통해 포커스 탐색을 자동으로 처리하지 않습니다. 메서드를 NavigateFocus 호출하여 사용자가 DesktopWindowXamlSource 로 이동할 때 프로그래밍 방식으로 포커스를 제공합니다.

마우스 클릭과 같은 일부 비 키보드 이벤트를 통해 DesktopWindowXamlSource 에 입력할 때 알림을 받을 GotFocus 이벤트를 처리하고 호스트 데스크톱 애플리케이션의 UI 상태를 최신 상태로 유지하려고 합니다.

적용 대상