我正在开发VisualBasic Windows Phone应用程序。我试图在我的内容面板上的bing地图上添加图钉,但我似乎无法正确访问'Pushpin'类。这肯定听起来很棒,但我刚开始学习了2天。我非常小心地在这里问问并研究得很好,但我看不出我做错了什么。
我的xaml.vb标题看起来像这样
Imports System
Imports System.Threading
Imports System.Windows.Controls
Imports Microsoft.Phone.Controls
Imports Microsoft.Phone.Shell
Imports System.Collections.ObjectModel
Imports System.Windows.Controls.Primitives
Imports System.Device.Location
Imports System.Threading.Tasks
Imports Windows.Devices.Geolocation
Imports System.IO.IsolatedStorage
Imports Microsoft.Phone.Maps
Imports Microsoft.Phone.Maps.Controls
Imports Microsoft.Phone.Maps.Toolkit
枢轴项目,地图标记包含在这里
<Grid Margin="0,0,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="0*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<maps:Map x:Name="myMap" Margin="0,0,10,10" Grid.RowSpan="2"/>
<TextBlock HorizontalAlignment="Left" Margin="10,37,0,0" Grid.Row="1" TextWrapping="Wrap" Text="Latitude:" VerticalAlignment="Top" Height="27" Width="76"/>
<TextBlock HorizontalAlignment="Left" Margin="10,59,0,0" Grid.Row="1" TextWrapping="Wrap" Text="Longitude:" VerticalAlignment="Top" RenderTransformOrigin="0.646,1.019" Height="27" Width="94"/>
<TextBlock x:Name="lat_dbl" HorizontalAlignment="Left" Margin="124,37,0,0" Grid.Row="1" TextWrapping="Wrap" Text="Lat_double" VerticalAlignment="Top" Height="27" Width="97"/>
<TextBlock x:Name="long_dbl" HorizontalAlignment="Left" Margin="124,59,0,0" Grid.Row="1" TextWrapping="Wrap" Text="long_double" VerticalAlignment="Top" Height="27" Width="110"/>
<TextBlock x:Name="Status" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Location Service Status" VerticalAlignment="Top" Margin="10,5,233,0" Grid.Row="1" Height="27" Width="203"/>
<Slider x:Name="pitchSlider_pitch" ValueChanged="sliderChanged_pitch" HorizontalAlignment="Left" Margin="342.844,210.275,-87.156,0" VerticalAlignment="Top" Width="190.312" Height="165.45" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Grid.Row="1">
<Slider.RenderTransform>
<CompositeTransform Rotation="-89.579"/>
</Slider.RenderTransform>
</Slider>
<Slider x:Name="pitchSlider_zoom" ValueChanged="sliderChanged_zoom" HorizontalAlignment="Left" Margin="244.844,-37.725,0,0" VerticalAlignment="Top" Width="190.312" Height="165.45" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Grid.Row="1">
<Slider.RenderTransform>
<CompositeTransform Rotation="0.598"/>
</Slider.RenderTransform>
</Slider>
</Grid>
</phone:PivotItem>