私のプッシュピンは、次のような一般的な方法でマップに追加されます。
C#:
private readonly ObservableCollection<PushpinModel> _pushpins = new observableCollection<PushpinModel>();
public ObservableCollection<PushpinModel> Pushpins
{
get{return _pushpins;}
}
XAML:
<my:MapItemsControl ItemsSource="{Binding Pushpins}">
<my:MapItemsControl.ItemTemplate>
<DataTemplate>
<my:Pushpin Style="{StaticResource PushpinStyle}"
MouseLeftButtonUp="Pushpin_MouseLeftButtonUp"
Location="{Binding Location}"
Content="{Binding Num}">
</my:Pushpin>
</DataTemplate>
</my:MapItemsControl.ItemTemplate>
</my:MapItemsControl>
画鋲をクリックすると、画鋲を送信者として取得し、位置情報を取得できます。PushpinModel
しかし、名前、説明、URL など、に関連付けられている他の情報を取得するために、そのオブジェクトを追跡したいと思いPushpin
ます。どうすればそれを行うことができますか?