I have written two custom Behaviors that I call DragBehavior and DropBehavior.
DragBehavior adds a PanGestureRecognizer to it's attached view, and translates it according to the Pan Events it receives. Also, while being dragged, DragBehavior emits an event with info regarding the view's screen coordinates (this is used by Drop targets to know if the they have a dragged view above them).
On the other side, DropBehavior looks at it's attached view parent (Layout<View> Parent expected) and attaches it's DraggedView eventHandler to all of it's (visual) siblings that implement DragBehavior.
While this is working just fine, I now want to be able to listen to the Drag events emitted by DragBehavior without a priori expecting the dragged view be a sibling of the view that implements DropBehavior (view that expects a drop).
I figured out that using an EventAggregator (accessible from all parts of the code) or using MessagingCenter could solve the problem, since DragBehavior will publish the dragging events, and any subscriber around the App would be able to listen to those events and react accordingly without knowing or caring where the event was generated.
Here comes my question: I cannot decide which approach to use (if using one of those two). I dislike the idea of coupling app's logic under the MessagingCenter's message string, since it makes it a bit messy to debug in the future in my opinion. Whereas the EventAggregator means having a static class (or Singleton) at the App's highest level, with the only use case of this UI dragging events.
Can anyone recommend one over the other one, or provide another solution for the problem I mention?
P.S.: I know of the existence of Xamarin's Drag and Drop Gesture Recognizers. But I dislike the UI they present and it has pretty poor customization options.