다음을 통해 공유


FocusManager.LosingFocus 이벤트

정의

포커스가 있는 현재 요소에서 대상 요소로 포커스가 이동하기 전에 발생합니다. 이 이벤트는 이벤트가 버블링되는 동안 포커스가 이동되지 않도록 동기적으로 발생합니다.

// Register
static event_token LosingFocus(EventHandler<LosingFocusEventArgs> const& handler) const;

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

// Revoke with event_revoker
static FocusManager::LosingFocus_revoker LosingFocus(auto_revoke_t, EventHandler<LosingFocusEventArgs> const& handler) const;
public static event System.EventHandler<LosingFocusEventArgs> LosingFocus;
function onLosingFocus(eventArgs) { /* Your code */ }
Microsoft.UI.Xaml.Input.FocusManager.addEventListener("losingfocus", onLosingFocus);
Microsoft.UI.Xaml.Input.FocusManager.removeEventListener("losingfocus", onLosingFocus);
- or -
Microsoft.UI.Xaml.Input.FocusManager.onlosingfocus = onLosingFocus;
Public Shared Custom Event LosingFocus As EventHandler(Of LosingFocusEventArgs) 
<uiElement LosingFocus="eventhandler"/>

이벤트 유형

설명

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

FocusNavigationDirection.PreviousFocusNavigationDirection.NextFindNextElementOptions와 함께 사용할 수 없습니다. FocusNavigationDirection.Up, FocusNavigationDirection.Down, FocusNavigationDirection.Left 또는 FocusNavigationDirection.Right만 지원됩니다.

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

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

적용 대상

추가 정보