Input event handling in WinUI Map and MapItem.

This commit is contained in:
ClemensFischer 2025-03-19 15:27:27 +01:00
parent 4cfaff7ba8
commit 86f307359f
7 changed files with 18 additions and 23 deletions

View file

@ -42,8 +42,14 @@ namespace MapControl
protected override void OnPointerPressed(PointerRoutedEventArgs e)
{
base.OnPointerPressed(e);
pointerPressedPosition = e.GetCurrentPoint(null).Position;
base.OnPointerPressed(e);
// Unsetting e.Handled enables PointerPressed event handlers
// and PointerPressed handling in class Map.
//
e.Handled = false;
}
protected override void OnPointerReleased(PointerRoutedEventArgs e)
@ -65,7 +71,9 @@ namespace MapControl
}
}
e.Handled = true;
// Unsetting e.Handled enables PointerReleased event handlers.
//
e.Handled = false;
}
protected override void OnApplyTemplate()