<commit_before>using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.PortableUI.Common;
using MonoGame.PortableUI.Controls.Events;

namespace MonoGame.PortableUI.Controls
{
    public abstract class Panel : Control
    {
        private ControlCollection _children;

        public ControlCollection Children
        {
            get { return _children; }
        }


        protected Panel()
        {
            _children = new ControlCollection(this);
            _children.CollectionChanged += _children_CollectionChanged;
        }     

        private void _children_CollectionChanged(object sender, CollectionChangedEventArgs args)
        {                                        
            InvalidateLayout(true);
        }

        public override IEnumerable<Control> GetDescendants()
        {
            return Children;
        }

    }
}<commit_msg>Added AddChild to Panel - close #28<commit_after>using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.PortableUI.Common;
using MonoGame.PortableUI.Controls.Events;

namespace MonoGame.PortableUI.Controls
{
    public abstract class Panel : Control
    {
        private ControlCollection _children;

        public ControlCollection Children
        {
            get { return _children; }
        }


        public void AddChild(Control control)
        {
            Children.Add(control);
        }

        protected Panel()
        {
            _children = new ControlCollection(this);
            _children.CollectionChanged += _children_CollectionChanged;
        }     

        private void _children_CollectionChanged(object sender, CollectionChangedEventArgs args)
        {                                        
            InvalidateLayout(true);
        }

        public override IEnumerable<Control> GetDescendants()
        {
            return Children;
        }

    }
}
{'fraction_non_alphanumeric': 0.06581532416502947, 'fraction_numerical': 0.0009823182711198428, 'mean_word_length': 2.0448430493273544, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2632332', 'n_tokens_mistral': 483, 'n_tokens_neox': 465, 'n_words': 106}