From cc4c62ab5d809ff451ca475a7949adc4fdfd806b Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Mon, 8 Aug 2016 19:22:52 +0200 Subject: IMLInstantiator implementation --- src/GraphicObjects/Group.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/GraphicObjects/Group.cs') diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index a6ca5758..4c8d0537 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -38,19 +38,14 @@ namespace Crow get { return _multiSelect; } set { _multiSelect = value; } } - - - public virtual T AddChild(T child) - { - GraphicObject g = child as GraphicObject; + public virtual void AddChild(GraphicObject g){ Children.Add(g); - g.Parent = this as GraphicObject; + g.Parent = this; g.ResolveBindings (); g.RegisteredLayoutings = LayoutingType.None; g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); g.LayoutChanged += OnChildLayoutChanges; - return (T)child; - } + } public virtual void RemoveChild(GraphicObject child) { child.LayoutChanged -= OnChildLayoutChanges; -- cgit v1.3.1-4-g156e