0

我想编写一个基于 wpf c# 语言的应用程序。

我已经运行了 bing 地图,我希望数据集显示在地图上,图钉位于特定位置的顶部。

4

1 回答 1

0

我不知道你是否可以让它工作,但我可以用这几行 XAML 代码和绑定来做到这一点。

<bing:MapItemsControl ItemsSource="{Binding LocationsList}">
                    <bing:MapItemsControl.ItemTemplate>
                        <DataTemplate>
                            <bing:Pushpin Location="{Binding Location}" Content="{Binding Content}">                                    
                            </bing:Pushpin>
                        </DataTemplate>
                    </bing:MapItemsControl.ItemTemplate>
                </bing:MapItemsControl>
于 2012-01-14T18:40:11.680 回答