2024-05-27 16:35:02 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2025-01-01 18:57:55 +01:00
|
|
|
|
// Copyright © Clemens Fischer
|
2024-05-27 16:35:02 +02:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class MapItem
|
|
|
|
|
|
{
|
|
|
|
|
|
public static readonly StyledProperty<bool> AutoCollapseProperty =
|
|
|
|
|
|
DependencyPropertyHelper.AddOwner<MapItem, bool>(MapPanel.AutoCollapseProperty);
|
|
|
|
|
|
|
|
|
|
|
|
public static readonly StyledProperty<Location> LocationProperty =
|
|
|
|
|
|
DependencyPropertyHelper.AddOwner<MapItem, Location>(MapPanel.LocationProperty, null,
|
|
|
|
|
|
(item, oldValue, newValue) => item.UpdateMapTransform(newValue));
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnPointerPressed(PointerPressedEventArgs e)
|
|
|
|
|
|
{
|
2024-05-29 16:29:13 +02:00
|
|
|
|
(ItemsControl.ItemsControlFromItemContainer(this) as MapItemsControl)?
|
|
|
|
|
|
.OnItemClicked(this, e.KeyModifiers.HasFlag(KeyModifiers.Control));
|
2024-05-27 16:35:02 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|