我正在关注这个热门指南 http://wp.qmatteoq.com/maps-in-windows-phone-8-and-phone-toolkit-a-winning-team-part-2/ 在我的应用程序中的Map控件上添加图钉。
问题是:当我尝试使用工具包时,例如:
<toolkit:MapExtensions.Children>
</toolkit:MapExtensions.Children>
或
<toolkit:Pushpin GeoCoordinate="{Binding Coordinate}" Content="{Binding Name}" />
编译器返回找不到该元素,并验证是否有该程序集的引用。
现在,我已经在AppManifest上启用了地图功能,并在地图页面的XAML中添加了这个:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
所以我真的不知道为什么会这样。
感谢大家。
答案 0 :(得分:0)
相反:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
使用此:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Maps.Toolkit;assembly=Microsoft.Phone.Controls.Toolkit"