mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Sample applications DoubleTapped handling
This commit is contained in:
parent
e8b6d318ec
commit
12a49f0881
4 changed files with 16 additions and 9 deletions
|
|
@ -169,13 +169,15 @@
|
|||
<map:MapItemsControl ItemContainerStyle="{StaticResource PointItemStyle}"
|
||||
ItemsSource="{Binding Points}"
|
||||
SelectionMode="Multiple"
|
||||
LocationMemberPath="Location"/>
|
||||
LocationMemberPath="Location"
|
||||
DoubleTapped="MapItemsControlDoubleTapped"/>
|
||||
|
||||
<map:MapItemsControl ItemContainerStyle="{StaticResource PushpinItemStyle}"
|
||||
ItemsSource="{Binding Pushpins}"
|
||||
SelectedItem="{Binding SelectedPushpin, Mode=TwoWay}"
|
||||
SelectionMode="Multiple"
|
||||
LocationMemberPath="Location"/>
|
||||
LocationMemberPath="Location"
|
||||
DoubleTapped="MapItemsControlDoubleTapped"/>
|
||||
|
||||
<map:MapPath Location="53.5,8.2" Stroke="Blue" StrokeThickness="3" Fill="#1F007F00">
|
||||
<map:MapPath.Data>
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@ namespace SampleApplication
|
|||
|
||||
partial void AddTestLayers();
|
||||
|
||||
private void ResetHeadingButtonClick(object sender, RoutedEventArgs e)
|
||||
private void MapItemsControlDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
|
||||
{
|
||||
map.TargetHeading = 0d;
|
||||
e.Handled = true; // prevent MapDoubleTapped
|
||||
}
|
||||
|
||||
private void MapDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
|
||||
|
|
@ -92,6 +92,11 @@ namespace SampleApplication
|
|||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
}
|
||||
|
||||
private void ResetHeadingButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
map.TargetHeading = 0d;
|
||||
}
|
||||
|
||||
private async void MapPointerPressed(object sender, PointerRoutedEventArgs e)
|
||||
{
|
||||
if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue