I am using the below code to disaply multiple pushpins from an XML file. I would like to know how I setup an tap event for each pushpin that will pass a value
foreach (var root in Transitresults)
{
var accentBrush = (Brush)Application.Current.Resources["PhoneAccentBrush"];
var pin = new Pushpin
{
Location = new GeoCoordinate
{
Latitude = root.Lat,
Longitude = root.Lon
},
Background = accentBrush,
Content = root.Name
};
BusStopLayer.AddChild(pin, pin.Location);
}
}
What you have is pretty close, try this:-