我有一個地圖上我動態顯示圖釘,並希望與圖釘互動而不與地圖交互(所以我不能通過設置IsEnabled="False"
來禁用地圖,我也不能使用地圖的圖像)。禁用地圖移動從筆觸
我試過這裏描述的技術:Handling tap on Pushpin in a fixed Map,這對於縮放和平移非常適用。
擴展這個想法我已經成立了事件處理所有這似乎符合事件:
Hold="map_Hold"
MapPan="map_MapPan"
MapZoom="Map_MapZoom"
ManipulationStarted="map_ManipulationStarted"
ManipulationDelta="map_ManipulationDelta"
ManipulationCompleted="map_ManipulationCompleted"
MouseLeftButtonDown="map_MouseLeftButtonDown"
MouseLeftButtonUp="map_MouseLeftButtonUp"
TargetViewChanged="map_TargetViewChanged"
ViewChangeStart="map_ViewChangeStart"
ViewChangeEnd="map_ViewChangeEnd"
ViewChangeOnFrame="map_ViewChangeOnFrame"
(在事件處理程序,我只是設置e.Handled = true;
)
然而,你仍然可以出鍋通過在其上進行輕彈動作(例如,如何輕彈到照片應用中的下一張圖像)。
有沒有辦法完全禁用地圖平移? 或者如果IsEnabled="False"
有沒有辦法與這些引腳進行交互?