diff options
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r-- | Xamarin.Forms.Core/NativeBindingHelpers.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Xamarin.Forms.Core/NativeBindingHelpers.cs b/Xamarin.Forms.Core/NativeBindingHelpers.cs index 7e2db65b..e4cae7d9 100644 --- a/Xamarin.Forms.Core/NativeBindingHelpers.cs +++ b/Xamarin.Forms.Core/NativeBindingHelpers.cs @@ -43,8 +43,10 @@ namespace Xamarin.Forms propertyChanged.PropertyChanged += (sender, e) => { if (e.PropertyName != targetProperty) return; - SetValueFromNative<TNativeView>(sender as TNativeView, targetProperty, bindableProperty); - }; + SetValueFromNative<TNativeView>(sender as TNativeView, targetProperty, bindableProperty); + //we need to keep the listener around he same time we have the proxy + proxy.NativeINPCListener = propertyChanged; + }; if (binding != null && binding.Mode != BindingMode.OneWay) SetValueFromNative(target, targetProperty, bindableProperty); @@ -178,6 +180,7 @@ namespace Xamarin.Forms public WeakReference<TNativeView> TargetReference { get; set; } public IList<KeyValuePair<BindableProperty, BindingBase>> BindingsBackpack { get; } = new List<KeyValuePair<BindableProperty, BindingBase>>(); public IList<KeyValuePair<BindableProperty, object>> ValuesBackpack { get; } = new List<KeyValuePair<BindableProperty, object>>(); + public INotifyPropertyChanged NativeINPCListener; public BindableObjectProxy(TNativeView target) { @@ -193,4 +196,4 @@ namespace Xamarin.Forms } } } -}
\ No newline at end of file +} |