diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2017-03-22 17:09:41 +0100 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-03-22 16:19:21 +0000 |
commit | b545d8194a3fc761b4f1c55dabe90c98ac60dff9 (patch) | |
tree | 5ba68eafe6ae71a271454ae7504046220f926f73 /Xamarin.Forms.Core | |
parent | 272488ae943fa0051e1d65fe61c9b85a5a601157 (diff) | |
download | xamarin-forms-b545d8194a3fc761b4f1c55dabe90c98ac60dff9.tar.gz xamarin-forms-b545d8194a3fc761b4f1c55dabe90c98ac60dff9.tar.bz2 xamarin-forms-b545d8194a3fc761b4f1c55dabe90c98ac60dff9.zip |
[C] Make sure all children are parented (#831)
* unit test
* [C] make sure all children are properly parented
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r-- | Xamarin.Forms.Core/Layout.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/Layout.cs b/Xamarin.Forms.Core/Layout.cs index 87a3453b..f5b71f3b 100644 --- a/Xamarin.Forms.Core/Layout.cs +++ b/Xamarin.Forms.Core/Layout.cs @@ -70,6 +70,10 @@ namespace Xamarin.Forms protected Layout() { + //if things were added in base ctor (through implicit styles), the items added aren't properly parented + if (InternalChildren.Count > 0) + InternalChildrenOnCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, InternalChildren)); + InternalChildren.CollectionChanged += InternalChildrenOnCollectionChanged; } |