C# 如何在windowsphone7和visual studio 2012中使用Bingmaps

C# 如何在windowsphone7和visual studio 2012中使用Bingmaps,c#,windows-phone-7,C#,Windows Phone 7,我正在尝试在windows phone 7 silverlight应用程序上使用bing地图控件,并尝试从以下网站进行跟踪: 但它显示了这个错误: XML命名空间中不存在标记“Map” 'clr命名空间:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl' 我做错什么了吗 确保已将Microsoft.Phone.Controls.Maps程序集添加到项目引用中 在PhoneApplicationPage中添加以下属性: xml

我正在尝试在windows phone 7 silverlight应用程序上使用bing地图控件,并尝试从以下网站进行跟踪: 但它显示了这个错误:

XML命名空间中不存在标记“Map” 'clr命名空间:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl'


我做错什么了吗

确保已将
Microsoft.Phone.Controls.Maps
程序集添加到项目引用中

在PhoneApplicationPage中添加以下属性:

xmlns:maps=“clr命名空间:Microsoft.Phone.Controls.maps;assembly=Microsoft.Phone.Controls.maps”
要在页面中使用Map控件,请执行以下操作:



成功。非常感谢。@nvp512请将其标记为答案。我很高兴这对你有帮助。