Please, I need help with a scenario below.
Due to strict approach of MVVM architecture, we are forbidden to use any events from the view.
I’ve created an
encapsulation of class Unit to HierarchyUnit, to create needed source for
radtreelistview. The original list is a list from database where units are
referenced by parent unit ID.
Now I’m trying to apply drag&drop scenario, but I failed with using PRISM in behaviors (everything seems to work, even in debug mode the field holding IEventAggregator instance is filled up with prism import), the event doesn’t reach the ViewModel.
Here comes the
drop function in DragDropBehavior.cs:
And finally – parent changing function, that should be called from the behavior.
Should I use a different approach, I got a mistake anywhere or it’s not possible to do it with the rules we have?