our situation is as follows: a RadGridView is shown on the left part of the screen. Right from that there is a RadTabControl with dynamic RadTabItems. Every RadTabItem holds a RadTileView control. The RadTabControl/Items + RadTileView/Items reside in a UserControl (TileViewTabControl2b.xaml
in the demo app). Both the RadGridView
in the main window and the RadTabControl
in the usercontrol use a DataTemplate to render their content (ContentViewModel->RadGridView, WorkspaceViewModel->RadTabControl). Now we want to drag an item from the RadGridView to the RadTileView (inside the RadTabItem).
Because the RadTabItem and RadTileView do not exist at compile time I pass the handlers to the DragDropManager when the controls are loaded. The handler passed to AddDragOverHandler() is catched as expected but the other handlers like the OnDrop handler are not catched. Any idea why these handlers are not called?
More general question: what is the preferred way to use the DragDropManager for controls that are created at runtime (by XAML, not in the code behind) like when MVVM is applied?
A demo project can be found here
Thanks in advance and kind regards,