diff options
| author | j-p <jp.bruyere@live.be> | 2016-08-11 04:20:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-11 04:20:36 +0200 |
| commit | 81eb8c7a75ffbe8b6740b2a84a9ebff75da9b393 (patch) | |
| tree | 3225277358a2bba61c4496923ba39353c942098b /src/GraphicObjects/Group.cs | |
| parent | 4d4a9116ea5c68b27f0b7c43db9682ab57738ae7 (diff) | |
| parent | 7560c0bb4a769210e289e2633ddf13d2617f8e6e (diff) | |
Merge pull request #18 from jpbruyere/BindingImprovement
Instantiator
Diffstat (limited to 'src/GraphicObjects/Group.cs')
| -rw-r--r-- | src/GraphicObjects/Group.cs | 11 |
1 files changed, 3 insertions, 8 deletions
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>(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; |