Solved! Go to Solution.
I have this wired-up using a Command & ViewModel. I can post that part if anyone is interested, just let me know.
Oh, that would awesome. But guess what would be even more, small complete sample with MVVM and Drag'n'drop :cool:.
<i:Interaction.Triggers > <i:EventTrigger EventName="Loaded"> <cmd:EventToCommand Command="{Binding MapLoadedCommand, Source={StaticResource DragDropViewModel}}" PassEventArgsToCommand="True"/> </i:EventTrigger> </i:Interaction.Triggers>
private void MapLoaded(object parameter) { // See if the event sent the map in the event args var p1 = parameter as System.Windows.RoutedEventArgs; if (p1 == null) { throw new NullReferenceException("Cannot capture map reference."); return; } _map = p1.Source as Map; }