我添加了Bing地圖到我的UWP視圖。我創建了自定義的MapItemControl。 我想單擊我的引腳時顯示工具提示。UWP圖釘工具提示點擊
這裏是我做過什麼:
<my:MapControl Name="Map" Center="{Binding Location, Converter={StaticResource LocationToGeopoint}}" ZoomLevel="{Binding ZoomLevel}">
<my:MapItemsControl ItemsSource="{Binding Offers}" >
<my:MapItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel my:MapControl.NormalizedAnchorPoint="0.5,1"
my:MapControl.Location="{Binding Location, Converter={StaticResource LocationToGeopoint}}"
Width="Auto" Height="Auto" >
<Grid Height="25" Width="25" Name="ContentGrid">
<Ellipse Fill="White" Height="Auto" Width="Auto"
Stroke="Red"
StrokeThickness="8"/>
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="PointerPressed">
<core:InvokeCommandAction
CommandParameter="{Binding Id}"
Command="{Binding ElementName=Map, Path=DataContext.PushpinTapped}" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Grid>
<Path Data="M33.4916,35.3059 L42.1937,35.3059 L38.1973,40.6036 z" Fill="Red" HorizontalAlignment="Center" Height="6.302" Margin="0,-1,0,0" Stretch="Fill" UseLayoutRounding="False" Width="9.702"/>
<ToolTip Style="{StaticResource MyToolTipStyle}"/>
</StackPanel>
</DataTemplate>
</my:MapItemsControl.ItemTemplate>
</my:MapItemsControl>
</my:MapControl>
現在工具提示是可見的所有的時間。我怎樣才能讓它只有在點擊引腳時纔可見?
Like [infobox](https://msdn.microsoft.com/en-us/library/mt750272.aspx)? –