Avalonia.Xaml.Behaviors
Avalonia.Xaml.Behaviors copied to clipboard
Drag and Drop Behavior
Hello
I have Grid
on Window
, and i try to add Behavior for DragOver
and Drop
event's, witch will call my custom ReactiveCommand
in MyViewModel
.
<Grid DragDrop.AllowDrop="True">
<i:Interaction.Behaviors>
<ia:EventTriggerBehavior EventName="Drop">
<ia:InvokeCommandAction Command="{Binding DropCommand}" />
</ia:EventTriggerBehavior>
</i:Interaction.Behaviors>
</Grid>
But i get a System.Xaml.XamlException: Cannot find an event named Drop on type Grid.
So i try to find else way to solve it, i found some DragDrop parameter and try to add command here DragDrop.Drop="DropCommand"
, and I see the following exception System.Xaml.XamlException: "Unable to resolve suitable regular or attached property Drop on type Avalonia.Input:Avalonia.Input.DragDrop
.
Is it's a bug? Couse a Grid
definitely has this event's.
And if i am do something wrong, please tell me how i can add a ReactiveCommand
to Drop and DragOver events, which will called after event was invoked?