You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I wanted to use DragDrop events in XAML, like it is commonly done in WPF (e.g. here: Drag-and-Drop Example | Microsoft Docs)
But it does not work because the events on the DragDrop class are no attached events, only standard RoutedEvents.
Describe the solution you'd like
The easiest solution would be to add the missing Add/RemoveHandler methods to DragDrop, but I think it would be better to not require them at all, since they are just wrappers for calling IInteractive.AddHandler, e.g. here:
Instead of requiring these additional methods, why can the Xaml compiler just not directly use element.AddHandler(<Event>, handler)?
This would make it much easier to define attached events, would not lead to head-scratching why this routed event does not work as attached event and would reduce not needed boilerplate code.
Also there is no risk of forgetting to add those methods so the event can be used as attached event, like it was for DragDrop.
Describe alternatives you've considered
Adding the missing (boilerplate) methods to DragDrop and maybe other classes where it yet has to be discovered that they are missing
Additional context
I was wondering for days why the DragDrop events where not working because I was not aware that additional methods would be required, but are missing. That was very frustrating. I know WPF does the same but I see no reason why not improve on it.
Is your feature request related to a problem? Please describe.
I wanted to use DragDrop events in XAML, like it is commonly done in WPF (e.g. here: Drag-and-Drop Example | Microsoft Docs)
But it does not work because the events on the DragDrop class are no attached events, only standard RoutedEvents.
Describe the solution you'd like
The easiest solution would be to add the missing Add/RemoveHandler methods to DragDrop, but I think it would be better to not require them at all, since they are just wrappers for calling IInteractive.AddHandler, e.g. here:
Instead of requiring these additional methods, why can the Xaml compiler just not directly use
element.AddHandler(<Event>, handler)
?This would make it much easier to define attached events, would not lead to head-scratching why this routed event does not work as attached event and would reduce not needed boilerplate code.
Also there is no risk of forgetting to add those methods so the event can be used as attached event, like it was for DragDrop.
Describe alternatives you've considered
Adding the missing (boilerplate) methods to DragDrop and maybe other classes where it yet has to be discovered that they are missing
Additional context
I was wondering for days why the DragDrop events where not working because I was not aware that additional methods would be required, but are missing. That was very frustrating. I know WPF does the same but I see no reason why not improve on it.
Quote from @kekekeks on Telegram:
The text was updated successfully, but these errors were encountered: