public Panel(IEnumerable <UIElement> elements) { children = new NotificationCollection <UIElement>(); children.AddRange(elements); children.Sender = this; children.Added += Child_Added; children.Removed += Child_Removed; }