using Avalonia.Input;
using Avalonia.Interactivity;
namespace Avalonia.Xaml.Interactions.Events;
///
///
///
public abstract class PointerCaptureLostEventBehavior : InteractiveBehaviorBase
{
static PointerCaptureLostEventBehavior()
{
RoutingStrategiesProperty.OverrideMetadata(
new StyledPropertyMetadata(
defaultValue: RoutingStrategies.Direct));
}
///
protected override void OnAttachedToVisualTree()
{
AssociatedObject?.AddHandler(InputElement.PointerCaptureLostEvent, PointerCaptureLost, RoutingStrategies);
}
///
protected override void OnDetachedFromVisualTree()
{
AssociatedObject?.RemoveHandler(InputElement.PointerCaptureLostEvent, PointerCaptureLost);
}
private void PointerCaptureLost(object? sender, PointerCaptureLostEventArgs e)
{
OnPointerCaptureLost(sender, e);
}
///
///
///
///
///
protected virtual void OnPointerCaptureLost(object? sender, PointerCaptureLostEventArgs e)
{
}
}