AvaloniaUI / Avalonia.Xaml.Behaviors

Port of Windows UWP Xaml Behaviors for Avalonia Xaml.
MIT License
385 stars 46 forks source link

Block of TreeViewItem expanding #161

Open NOoBODDY opened 3 months ago

NOoBODDY commented 3 months ago

When using ContextDragBehavior on a TreeViewItem, a problem arises. If an item is selected, you can't collapse/expand it by clicking on the toggle. Apparently the problem is in this code https://github.com/AvaloniaUI/Avalonia.Xaml.Behaviors/blob/d62d2aa68e3943b26b8f33cc120f2e8cc707e038/src/Avalonia.Xaml.Interactions.DragAndDrop/ContextDragBehavior.cs#L140C17-L140C27 I tried to find the reason for its occurrence, but found nothing. The comment next to it suggests some sort of selection problem with drop. But if I remove this code, nothing like this is observed. Is there any way to fix it?