[VB2012] 次のコードを使用して、データベースから Bing Maps WPF MapLayer (ml) に画鋲を繰り返し追加しています。
Dim pp As New Pushpin()
pp.Location = New Location(utm.Latitude.GetDecimalCoordinate, utm.Longitude.GetDecimalCoordinate)
pp.PositionOrigin = PositionOrigin.BottomCenter
pp.Content = PinLabel
pp.ToolTip = PinLabel
pp.FontSize = 6.0R
' need to put an AddHandler in here
ml.Children.Add(pp)
画鋲が追加され、maplayer に表示されます。私が理解していないのは、画鋲がクリックされたときに判断できるように、画鋲ごとに AddHandler を追加する方法です。いくつかの洞察をいただければ幸いです。私が見つけたオンラインの例から、私がする必要があることがわかりません。