From 66497632f545cf31e2fbad4a8a86bcf41d49a5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Mon, 6 Jan 2025 17:35:15 +0100 Subject: [PATCH] Update RoutedEventTriggerBaseOfT.cs --- .../Core/RoutedEventTriggerBaseOfT.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Xaml.Interactions.Custom/Core/RoutedEventTriggerBaseOfT.cs b/src/Avalonia.Xaml.Interactions.Custom/Core/RoutedEventTriggerBaseOfT.cs index f7793cd4..c9c7832e 100644 --- a/src/Avalonia.Xaml.Interactions.Custom/Core/RoutedEventTriggerBaseOfT.cs +++ b/src/Avalonia.Xaml.Interactions.Custom/Core/RoutedEventTriggerBaseOfT.cs @@ -31,13 +31,27 @@ protected override void OnAttached(CompositeDisposable disposables) } } - private void Handler(object? sender, T e) + /// + /// + /// + /// + /// + protected virtual void Handler(object? sender, T e) { if (!IsEnabled) { return; } + Execute(e); + } + + /// + /// + /// + /// + protected void Execute(T e) + { e.Handled = MarkAsHandled; Interaction.ExecuteActions(AssociatedObject, Actions, e); }