Share via


UIElement.LosingFocus event

[This documentation is preliminary and is subject to change.]

Occurs immediately before the directional focus algorithm changes focus away from this element. Apps can handle the event and set Handled to true in the event data; this will cancel the focus change.

Syntax

public event TypedEventHandler<UIElement, LosingFocusEventArgs> LosingFocus
Public Event LosingFocus As TypedEventHandler(Of UIElement, LosingFocusEventArgs)
public:
event TypedEventHandler<UIElement, LosingFocusEventArgs>^ LosingFocus {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<UIElement, LosingFocusEventArgs>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate TypedEventHandler<UIElement, LosingFocusEventArgs>

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml Windows::UI::Xaml [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

See also

UIElement

LosingFocusEventArgs