Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent changing DragEffects in TreeDataGrid DragDrop event-handlers if AutoDragDropRows=false #284

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BreakByBrick
Copy link

@BreakByBrick BreakByBrick commented Apr 19, 2024

  • AutoDragDropRows check moved to the beginning of DragDrop event-handlers, before they perform any actions. This is necessary for inherited from TreeDataGrid types, with custom DragDrop event-handlers. Now e.DragDropEffects of DragOver event-handler is always None in inherited types, if AutoDragDropRows=false.

  • Also AutoDragDropRows check moved to the beginning of RaiseRowDragStarted method, to prevent RowDragStartedEvent.

…lers if AutoDragDropRows=false

- AutoDragDropRows check moved to the beginning of DragDrop event-handlers, before they perform any actions.
This is necessary for inherited from TreeDataGrid types, with custom DragDrop event-handlers. Now DragEventArgs.DragDropEffects is always None in inherited types, even if AutoDragDropRows is false.
- Also AutoDragDropRows check moved to the beginning of RaiseRowDragStarted method, to prevent RowDragStartedEvent.
@BreakByBrick
Copy link
Author

@dotnet-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant