XAML-Map-Control/MapControl/Avalonia/MapPanel.Avalonia.cs
2025-11-19 23:34:39 +01:00

27 lines
906 B
C#

using Avalonia;
namespace MapControl
{
public partial class MapPanel
{
public static readonly AttachedProperty<bool> AutoCollapseProperty =
DependencyPropertyHelper.RegisterAttached<bool>("AutoCollapse", typeof(MapPanel));
public static readonly AttachedProperty<Location> LocationProperty =
DependencyPropertyHelper.RegisterAttached<Location>("Location", typeof(MapPanel));
public static readonly AttachedProperty<BoundingBox> BoundingBoxProperty =
DependencyPropertyHelper.RegisterAttached<BoundingBox>("BoundingBox", typeof(MapPanel));
static MapPanel()
{
AffectsParentArrange<MapPanel>(LocationProperty, BoundingBoxProperty);
}
public static MapBase GetParentMap(FrameworkElement element)
{
return (MapBase)element.GetValue(ParentMapProperty);
}
}
}