Skip to content

Commit

Permalink
Use RoutedEventTriggerBehavior
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Dec 10, 2023
1 parent 5daa872 commit 8f98509
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/SvgToXaml.Base/Views/ItemsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="using:Avalonia.Xaml.Interactivity"
xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
xmlns:rx="using:System.Reactive"
xmlns:vm="using:SvgToXaml.ViewModels"
mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="450"
Expand Down Expand Up @@ -32,11 +30,12 @@
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
Focusable="True">
<i:Interaction.Behaviors>
<ia:EventTriggerBehavior EventName="DoubleTapped">
<ia:InvokeCommandAction Command="{Binding PreviewCommand}" CommandParameter="{x:Static rx:Unit.Default}"/>
</ia:EventTriggerBehavior>
</i:Interaction.Behaviors>
<Interaction.Behaviors>
<RoutedEventTriggerBehavior RoutedEvent="{x:Static InputElement.DoubleTappedEvent}"
RoutingStrategies="Bubble">
<InvokeCommandAction Command="{Binding PreviewCommand}" CommandParameter="{x:Static rx:Unit.Default}"/>
</RoutedEventTriggerBehavior>
</Interaction.Behaviors>
<Panel.KeyBindings>
<KeyBinding Gesture="Delete" Command="{Binding RemoveCommand}" />
</Panel.KeyBindings>
Expand Down

0 comments on commit 8f98509

Please sign in to comment.