mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 22:18:56 +00:00
Sample Applications DoubleTapped
This commit is contained in:
parent
45b6c012e0
commit
49bd02863a
4 changed files with 13 additions and 25 deletions
|
|
@ -163,16 +163,14 @@
|
|||
<map:MapItemsControl ItemContainerStyle="{StaticResource PointItemStyle}"
|
||||
ItemsSource="{Binding Points}"
|
||||
SelectionMode="Multiple"
|
||||
LocationMemberPath="Location"
|
||||
DoubleTapped="MapItemsControlDoubleTapped"/>
|
||||
LocationMemberPath="Location"/>
|
||||
|
||||
<map:MapItemsControl ItemContainerStyle="{StaticResource PushpinItemStyle}"
|
||||
ItemsSource="{Binding Pushpins}"
|
||||
SelectedItem="{Binding SelectedPushpin, Mode=TwoWay}"
|
||||
SelectionMode="Multiple"
|
||||
LocationMemberPath="Location"
|
||||
SelectionChanged="MapItemsControlSelectionChanged"
|
||||
DoubleTapped="MapItemsControlDoubleTapped"/>
|
||||
SelectionChanged="MapItemsControlSelectionChanged"/>
|
||||
|
||||
<map:MapPath Location="53.5,8.2" Stroke="Blue" StrokeThickness="3" Fill="#1F007F00" IsHitTestVisible="False">
|
||||
<map:MapPath.Data>
|
||||
|
|
|
|||
|
|
@ -36,14 +36,12 @@ namespace SampleApplication
|
|||
Debug.WriteLine("SelectedItems: " + string.Join(", ", ((MapItemsControl)sender).SelectedItems.OfType<PointItem>().Select(item => item.Name)));
|
||||
}
|
||||
|
||||
private void MapItemsControlDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
|
||||
{
|
||||
e.Handled = true; // prevent MapDoubleTapped
|
||||
}
|
||||
|
||||
private void MapDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
|
||||
{
|
||||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
if (e.OriginalSource is Map map)
|
||||
{
|
||||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetHeadingButtonClick(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue