summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2016-11-16 08:24:21 (GMT)
committerStephane Delcroix <stephane@delcroix.org>2016-11-16 08:24:21 (GMT)
commit107ed5e545698a647b9cd1be22745a2c35aeebc4 (patch)
tree2d7a1a7ffbaead750e706334af77a2b63d29d984 /Xamarin.Forms.Core
parent46104e9ce186bb06567755f979414e0cbc426db6 (diff)
downloadxamarin-forms-107ed5e545698a647b9cd1be22745a2c35aeebc4.zip
xamarin-forms-107ed5e545698a647b9cd1be22745a2c35aeebc4.tar.gz
xamarin-forms-107ed5e545698a647b9cd1be22745a2c35aeebc4.tar.bz2
BindingContext changes are called multiple times on app start (#470)
* inherited binding context fix * add check for child binding context * Revert "add check for child binding context" This reverts commit 71952f39129cfedc2358a32100deb07bd32a3080. * unit tests
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/BindableObject.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Xamarin.Forms.Core/BindableObject.cs b/Xamarin.Forms.Core/BindableObject.cs
index fdf2afa..217f4a9 100644
--- a/Xamarin.Forms.Core/BindableObject.cs
+++ b/Xamarin.Forms.Core/BindableObject.cs
@@ -98,6 +98,10 @@ namespace Xamarin.Forms
return;
object oldContext = bindable._inheritedContext;
+
+ if (ReferenceEquals(oldContext, value))
+ return;
+
if (bpContext != null && oldContext == null)
oldContext = bpContext.Value;
@@ -108,9 +112,6 @@ namespace Xamarin.Forms
}
else
{
- if (ReferenceEquals(oldContext, value))
- return;
-
bindable._inheritedContext = value;
}