summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/ListView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/ListView.cs')
-rw-r--r--Xamarin.Forms.Core/ListView.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/ListView.cs b/Xamarin.Forms.Core/ListView.cs
index fa9f738e..dcc13e69 100644
--- a/Xamarin.Forms.Core/ListView.cs
+++ b/Xamarin.Forms.Core/ListView.cs
@@ -87,6 +87,25 @@ namespace Xamarin.Forms
set { SetValue(FooterTemplateProperty, value); }
}
+ protected override void OnBindingContextChanged()
+ {
+ base.OnBindingContextChanged();
+
+ object bc = BindingContext;
+
+ var header = Header as Element;
+ if (header != null)
+ {
+ SetChildInheritedBindingContext(header, bc);
+ }
+
+ var footer = Footer as Element;
+ if (footer != null)
+ {
+ SetChildInheritedBindingContext(footer, bc);
+ }
+ }
+
public BindingBase GroupDisplayBinding
{
get { return _groupDisplayBinding; }