MapLayer/MapLayerItemsSource

This commit is contained in:
ClemensFischer 2025-08-12 10:57:44 +02:00
parent 612c489eb9
commit bb47829cd3
4 changed files with 107 additions and 56 deletions

View file

@ -1,4 +1,6 @@
namespace MapControl
using System.Collections.Generic;
namespace MapControl
{
public partial class MapPanel
{
@ -13,6 +15,16 @@
protected Controls ChildElements => Children;
protected FrameworkElement GetChildElement(int index) => index < Children.Count ? Children[index] : null;
protected void InsertChildElement(int index, FrameworkElement element) => Children.Insert(index, element);
protected void InsertChildElements(int index, IEnumerable<FrameworkElement> elements) => Children.InsertRange(index, elements);
protected void RemoveChildElement(int index) => Children.RemoveAt(index);
protected void RemoveChildElements(int index, int count) => Children.RemoveRange(index, count);
static MapPanel()
{
AffectsParentArrange<MapPanel>(LocationProperty, BoundingBoxProperty);