Range selection in MapItemsControl

This commit is contained in:
ClemensFischer 2025-03-17 10:56:42 +01:00
parent da63e55fd4
commit 1fc35d90c0
4 changed files with 41 additions and 9 deletions

View file

@ -9,14 +9,12 @@
DependencyPropertyHelper.AddOwner<MapItem, Location>(MapPanel.LocationProperty, null,
(item, oldValue, newValue) => item.UpdateMapTransform(newValue));
/// <summary>
/// Prevent range selection by Shift+PointerPressed.
/// </summary>
protected override void OnPointerPressed(PointerPressedEventArgs e)
{
if (e.KeyModifiers.HasFlag(KeyModifiers.Shift))
{
e.Handled = true;
MapItemsControl.SetSelectedItemsRange(this);
}
else
{