using Avalonia.Input; namespace Avalonia.Xaml.Interactions.Events; /// /// /// public abstract class GotFocusEventBehavior : InteractiveBehaviorBase { /// protected override void OnAttachedToVisualTree() { AssociatedObject?.AddHandler(InputElement.GotFocusEvent, GotFocus, RoutingStrategies); } /// protected override void OnDetachedFromVisualTree() { AssociatedObject?.RemoveHandler(InputElement.GotFocusEvent, GotFocus); } private void GotFocus(object? sender, GotFocusEventArgs e) { OnGotFocus(sender, e); } /// /// /// /// /// protected virtual void OnGotFocus(object? sender, GotFocusEventArgs e) { } }