GW2PAO.Modules.Map.Views.MapView.Map_OnDrop C# (CSharp) Method

Map_OnDrop() private method

private Map_OnDrop ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void
        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"?
            }
        }
    }