I use the latest RTM tools for Phone 7 (downloadable today, October 7, 2010).
I am trying to do a simple thing here:
when the user deletes once on the map control, I want to put a pin there. also, I want to keep the regular built-in map management behavior ( double-tap ).
(If you cannot save both behaviors, then perhaps a long press on the card to put a pushpin).
While trying to figure this out, I came across this documentation about the changes made to the control card for Phone7:
http://msdn.microsoft.com/en-us/library/ff955762.aspx
Then I saw a new MapInputEventArgs class that has a ViewportPoint member.
While looking at the code examples in the regular monitoring of the SilverLight map, I saw something like this:
private void OnMouseClick(object sender, MapMouseEventArgs e)
{
Point clickLocation = e.ViewportPoint;
Location location = x_Map.ViewportPointToLocation(clickLocation);
Pushpin pushpin = new Pushpin();
m_PushpinLayer.AddChild(pushpin, new Location(latitude, longitude));
}
But in the case of Phone7, I cannot find the appropriate event handler, and I could not find who uses MapInputEventArgs in the map control. A google search gives me only 1 result!
So, where is the corresponding event for "Tap once", and how can I get ViewportPoint after this event has been fired?
Thanks in advance.