FocusManager.LostFocus 이벤트

정의

컨테이너 요소 내의 요소(포커스 scope)가 포커스를 잃을 때 발생합니다. 이 이벤트는 비동기적으로 발생하므로 버블링이 완료되기 전에 포커스가 다시 이동할 수 있습니다.

// Register
static event_token LostFocus(EventHandler<FocusManagerLostFocusEventArgs> const& handler) const;

// Revoke with event_token
static void LostFocus(event_token const* cookie) const;

// Revoke with event_revoker
static FocusManager::LostFocus_revoker LostFocus(auto_revoke_t, EventHandler<FocusManagerLostFocusEventArgs> const& handler) const;
public static event System.EventHandler<FocusManagerLostFocusEventArgs> LostFocus;
function onLostFocus(eventArgs) { /* Your code */ }
Windows.UI.Xaml.Input.FocusManager.addEventListener("lostfocus", onLostFocus);
Windows.UI.Xaml.Input.FocusManager.removeEventListener("lostfocus", onLostFocus);
- or -
Windows.UI.Xaml.Input.FocusManager.onlostfocus = onLostFocus;
Public Shared Custom Event LostFocus As EventHandler(Of FocusManagerLostFocusEventArgs) 

이벤트 유형

Windows 요구 사항

디바이스 패밀리
Windows 10, version 1809 (10.0.17763.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v7.0에서 도입되었습니다.)

설명

가능하면 FocusManager 이벤트 대신 UIElement 포커스 라우트된 이벤트를 사용하는 것이 좋습니다.

UIElement 포커스 이벤트는 다음 순서대로 FocusManager까지 버블업됩니다.

  1. UIElement.LosingFocus/FocusManager.LosingFocus
  2. UIElement.GettingFocus/FocusManager.GettingFocus
  3. UIElement.LostFocus 라우트된 이벤트는 포커스를 잃고 이벤트가 버블 업되는 요소에 의해 발생합니다.
  4. FocusManager.LostFocus가 발생합니다(라우트된 이벤트가 처리된 것으로 표시되더라도).
  5. UIElement.GotFocus 라우트 된 이벤트는 포커스를 받은 요소에 의해 발생하고 이벤트가 버블업됩니다.
  6. FocusManager.GotFocus 가 발생합니다(라우트된 이벤트가 처리된 것으로 표시된 경우에도).

적용 대상

추가 정보