AvaloniaUI / Avalonia.Xaml.Behaviors

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

Fix: Buttons no longer work on the TreeView element when the element is selected. #158

Open Tadelsucht opened 4 months ago

Tadelsucht commented 4 months ago

Buttons no longer work on the TreeView element when the element is selected. For example, if Node0 is not selected in the DragAndDropSample application, the collapse arrow will work. However, if Node0 is selected, it no longer works. Other buttons that are added to the element will also no longer work.

As a fix, I have added the following line locally in the AssociatedObject_PointerPressed method in the ContextDragBehavior class at the end of the method: e.Handled = false; Drag and drop still works and the buttons still work with a selected element.

Tadelsucht commented 4 months ago

@dotnet-policy-service agree