XAML-Map-Control/MapControl/Avalonia/MapPanel.Avalonia.cs

27 lines
906 B
C#
Raw Normal View History

2025-11-19 23:34:39 +01:00
using Avalonia;
2025-08-19 19:43:02 +02:00
namespace MapControl
2024-05-19 23:23:27 +02:00
{
2024-05-20 23:24:34 +02:00
public partial class MapPanel
2024-05-19 23:23:27 +02:00
{
2024-05-27 11:05:22 +02:00
public static readonly AttachedProperty<bool> AutoCollapseProperty =
DependencyPropertyHelper.RegisterAttached<bool>("AutoCollapse", typeof(MapPanel));
2024-05-27 11:05:22 +02:00
public static readonly AttachedProperty<Location> LocationProperty =
DependencyPropertyHelper.RegisterAttached<Location>("Location", typeof(MapPanel));
2024-05-27 11:05:22 +02:00
public static readonly AttachedProperty<BoundingBox> BoundingBoxProperty =
DependencyPropertyHelper.RegisterAttached<BoundingBox>("BoundingBox", typeof(MapPanel));
2024-05-27 11:05:22 +02:00
static MapPanel()
{
AffectsParentArrange<MapPanel>(LocationProperty, BoundingBoxProperty);
}
2025-11-13 13:36:28 +01:00
public static MapBase GetParentMap(FrameworkElement element)
2024-05-19 23:23:27 +02:00
{
2024-05-20 23:24:34 +02:00
return (MapBase)element.GetValue(ParentMapProperty);
2024-05-19 23:23:27 +02:00
}
}
}