private void Map_OnDrop(object sender, RoutedEventArgs e)
{
// Calculate and set the dropped item's location on the actual map
var dropArgs = e as OnDropEventArgs;
if (dropArgs != null)
{
var locationHolder = dropArgs.Data as IHasMapLocation;
if (locationHolder != null)
{
var location = this.Map.ViewportPointToLocation(dropArgs.GetPosition(this.Map));
locationHolder.Location = new Location(location.Latitude, Location.NormalizeLongitude(location.Longitude));
}
// TODO:
// Open pop-up or other controls to let a user enter a name/description
// - Maybe make this just bound to a bool on the view model of the object, something like "IsEditingName"?
}
}
}