mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 23:15:14 +00:00
Sample Applications DoubleTapped
This commit is contained in:
parent
45b6c012e0
commit
49bd02863a
4 changed files with 13 additions and 25 deletions
|
|
@ -64,8 +64,7 @@
|
|||
<map:MapItemsControl ItemsSource="{Binding Pushpins}"
|
||||
SelectedItem="{Binding SelectedPushpin}"
|
||||
SelectionMode="Multiple"
|
||||
SelectionChanged="MapItemsControlSelectionChanged"
|
||||
DoubleTapped="MapItemsControlDoubleTapped">
|
||||
SelectionChanged="MapItemsControlSelectionChanged">
|
||||
<map:MapItemsControl.Styles>
|
||||
<Style Selector="map|MapItem">
|
||||
<Setter Property="map:MapPanel.Location" Value="{Binding Location}"/>
|
||||
|
|
|
|||
|
|
@ -36,14 +36,12 @@ namespace SampleApplication
|
|||
map.TargetHeading = 0d;
|
||||
}
|
||||
|
||||
private void MapItemsControlDoubleTapped(object sender, TappedEventArgs e)
|
||||
{
|
||||
e.Handled = true; // prevent MapDoubleTapped
|
||||
}
|
||||
|
||||
private void MapDoubleTapped(object sender, TappedEventArgs e)
|
||||
{
|
||||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
if (e.Source == map)
|
||||
{
|
||||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
}
|
||||
}
|
||||
|
||||
private void MapPointerPressed(object sender, PointerPressedEventArgs e)
|
||||
|
|
@ -52,11 +50,7 @@ namespace SampleApplication
|
|||
{
|
||||
var point = e.GetCurrentPoint(map);
|
||||
|
||||
if (point.Properties.IsLeftButtonPressed)
|
||||
{
|
||||
map.Cursor = new Cursor(StandardCursorType.Hand);
|
||||
}
|
||||
else if (point.Properties.IsRightButtonPressed)
|
||||
if (point.Properties.IsRightButtonPressed)
|
||||
{
|
||||
e.Pointer.Capture(map);
|
||||
var location = map.ViewToLocation(point.Position);
|
||||
|
|
@ -76,11 +70,10 @@ namespace SampleApplication
|
|||
if (e.Pointer.Captured == map)
|
||||
{
|
||||
e.Pointer.Capture(null);
|
||||
map.Cursor = null;
|
||||
measurementLine.IsVisible = false;
|
||||
measurementLine.Locations = null;
|
||||
}
|
||||
|
||||
map.Cursor = null;
|
||||
}
|
||||
|
||||
private void MapPointerMoved(object sender, PointerEventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue