/// <inheritdoc />
        protected override IList <AutomationPeer> GetChildrenCore()
        {
            List <AutomationPeer> peers = new List <AutomationPeer>();

            foreach (MapLayer layer in this.MapOwner.Layers)
            {
                if (layer is MapShapeLayer)
                {
                    MapShapeLayerAutomationPeer layerPeer = CreatePeerForElement(layer) as MapShapeLayerAutomationPeer;
                    if (layerPeer != null)
                    {
                        layerPeer.GetChildren();
                        peers.Add(layerPeer);
                    }
                }
            }
            return(peers);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MapShapeAutomationPeer"/> class.
 /// </summary>
 /// <param name="layerPeer">The parent shape layer.</param>
 /// <param name="shapeModel">The underlying shape model.</param>
 public MapShapeAutomationPeer(MapShapeLayerAutomationPeer layerPeer, IMapShape shapeModel) : base()
 {
     this.LayerPeer  = layerPeer;
     this.ShapeModel = shapeModel;
 }