我有一個地圖控件,顯示一些圖釘。我不希望用戶在地圖中導航,所以我禁用它。但我確實希望用戶能夠點按圖釘(並且在導航到詳細信息頁面的情況下)。在固定地圖上使用圖釘處理水龍頭
但是,當Map.IsEnabled爲false時,Pushpins似乎也不會接收任何手勢。我也嘗試使用IsHitTestVisible,但沒有運氣。
一些代碼顯示我正在嘗試做什麼。有沒有人有任何想法?
<maps:Map Name="Map"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
CopyrightVisibility="Collapsed" LogoVisibility="Collapsed" ScaleVisibility="Collapsed" ZoomBarVisibility="Collapsed"
IsEnabled="False">
<maps:MapItemsControl ItemsSource="{Binding TheCollection}">
<maps:MapItemsControl.ItemTemplate>
<DataTemplate>
<maps:Pushpin Name="Pin" Location="{Binding Coordinate}" Content="{Binding Ix}">
<maps:Pushpin.Background>
<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
</maps:Pushpin.Background>
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener Tap="PinTap" />
</toolkit:GestureService.GestureListener>
</maps:Pushpin>
</DataTemplate>
</maps:MapItemsControl.ItemTemplate>
</maps:MapItemsControl>
</maps:Map>
我會試試看。而且,是的,圖釘在地圖之外工作。我將它用在隨附的ListBox中,以便在列表和地圖中具有相同的「外觀」項目。 – Ostemar 2011-02-01 16:10:21
關於如何實現「處理所有手勢事件」的任何想法。我已經處理了操作[已啓動,增量,已完成]和MouseLeftButton [向下,向上]並將e.Handled設置爲true。那些沒有幫助。還有什麼我應該做的? – Ostemar 2011-02-01 16:41:52