我正在将一个 iPhone 应用程序移植到 WP7,其中包含一个带有多个标记/图钉的地图,这些标记/图钉是我从网络服务(位置、图标和标题)获得的。
我已经设置了显示地图所需的 XAML 以及图钉的一些代码:
<phone:PhoneApplicationPage.Resources>
<ControlTemplate x:Key="customPushpin" TargetType="my:Pushpin">
<Image Height="39" Source="Resources/Icons/Pushpins/pinGreen.png" Stretch="Fill" Width="32"/>
</ControlTemplate>
</phone:PhoneApplicationPage.Resources>
<Grid x:Name="LayoutRoot" Background="Transparent">
<my:Map Height="Auto" HorizontalAlignment="Stretch" Margin="0" x:Name="Map"
VerticalAlignment="Stretch" Width="Auto" CredentialsProvider="{Binding CredentialsProvider}"
CopyrightVisibility="Collapsed" LogoVisibility="Collapsed" Center="{Binding Mode=TwoWay, Path=Center}"
ZoomBarVisibility="Visible"
ZoomLevel="{Binding Zoom, Mode=TwoWay}">
<my:MapItemsControl ItemsSource="{Binding Pushpins}">
<my:MapItemsControl.ItemTemplate>
<DataTemplate>
<my:Pushpin MouseLeftButtonUp="Pushpin_MouseLeftButtonUp"
Location="{Binding Location}"
Template="{StaticResource customPushpin}">
</my:Pushpin>
</DataTemplate>
</my:MapItemsControl.ItemTemplate>
</my:MapItemsControl>
</my:Map>
</Grid>
我正在寻找一种在用户单击图钉时添加某种气泡的方法。我对信息框/工具提示进行了一些研究,但由于它们在悬停时工作,所以我不能将其用于手机(点击/单击)。
我猜在 WP7 中没有类似的控件会产生气泡 - 我怎么能去创建类似的东西?
提前致谢,
亚历克斯