diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-09-08 20:39:05 +0200 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-09-08 11:39:05 -0700 |
commit | 85426c5d9495eb1d55b3128bf97e50c68a73b53f (patch) | |
tree | 2f81e5868ce61eb90d15c6c51a354603b8395627 /Xamarin.Forms.Platform.Android/NativeViewWrapper.cs | |
parent | 11326e1c182b3ff5c3d82c6ef7d09c193bc19891 (diff) | |
download | xamarin-forms-85426c5d9495eb1d55b3128bf97e50c68a73b53f.tar.gz xamarin-forms-85426c5d9495eb1d55b3128bf97e50c68a73b53f.tar.bz2 xamarin-forms-85426c5d9495eb1d55b3128bf97e50c68a73b53f.zip |
Native Bindings (#278)
* [C, I, A, W] Support Native Bindings
* fix tabs
Diffstat (limited to 'Xamarin.Forms.Platform.Android/NativeViewWrapper.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/NativeViewWrapper.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/NativeViewWrapper.cs b/Xamarin.Forms.Platform.Android/NativeViewWrapper.cs index eecef9bc..53b5253c 100644 --- a/Xamarin.Forms.Platform.Android/NativeViewWrapper.cs +++ b/Xamarin.Forms.Platform.Android/NativeViewWrapper.cs @@ -1,3 +1,5 @@ +using Android.Views; + namespace Xamarin.Forms.Platform.Android { public class NativeViewWrapper : View @@ -9,6 +11,8 @@ namespace Xamarin.Forms.Platform.Android NativeView = nativeView; OnLayoutDelegate = onLayoutDelegate; OnMeasureDelegate = onMeasureDelegate; + + nativeView.TransferBindablePropertiesToWrapper(this); } public GetDesiredSizeDelegate GetDesiredSizeDelegate { get; } @@ -18,5 +22,11 @@ namespace Xamarin.Forms.Platform.Android public OnLayoutDelegate OnLayoutDelegate { get; } public OnMeasureDelegate OnMeasureDelegate { get; } + + protected override void OnBindingContextChanged() + { + NativeView.SetBindingContext(BindingContext, (view) => (view as ViewGroup)?.GetChildrenOfType<global::Android.Views.View>()); + base.OnBindingContextChanged(); + } } }
\ No newline at end of file |