Reputation: 2161
I can't get the UWP MapControl to fire events such as Tapped or DoubleTapped MapElementClick ETC.GotFocus is firing ok.
<maps:MapControl
Name="myFirstMap"
Grid.Row="1"
Margin="10"
DoubleTapped="myFirstMap_DoubleTapped"
IsDoubleTapEnabled="True"
IsTapEnabled="True"
MapElementClick="MyFirstMap_MapElementClick"
MapServiceToken="myKey"
Tapped="myFirstMap_Tapped" />
</Grid>
</Grid>
I must be doing something daft any ideas? Event handled in code behind.
private void myFirstMap_DoubleTapped(object sender, doubleTappedRoutedEventArgs e)
{
//nothing happening here?!
}
Tried attaching GotFocus and that is firing. Seems very odd. It's all working except for the events. .
Upvotes: 1
Views: 193
Reputation: 2161
Another two hours of my life I will never get back! Do not use:
Tapped="EventHandler"
But
MapTapped="EventHandler"
There is a difference between the events Tapped and DoubleTapped and MapTapped and MapDoubleTapped.
Upvotes: 3