[NUI] Add inherit binding context support (#880)
authorXianbing Teng <xb.teng@samsung.com>
Tue, 11 Jun 2019 02:24:12 +0000 (10:24 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 11 Jun 2019 02:24:12 +0000 (11:24 +0900)
src/Tizen.NUI.Xaml/src/public/Forms/BaseComponents/View.cs
src/Tizen.NUI.Xaml/src/public/XamlBinding/ContentPage.cs

index 49723da..8fd63ab 100755 (executable)
@@ -976,6 +976,7 @@ namespace Tizen.NUI.Xaml.Forms.BaseComponents
                 };
                 ChildAdded(this, e);
             }
+            BindableObject.SetInheritedBindingContext(child, this?.BindingContext);
         }
 
         /// <summary>
index 3fa1665..6f5d388 100755 (executable)
@@ -45,6 +45,11 @@ namespace Tizen.NUI.Xaml
             {
                 self.Root.Add((View)newValue);
             }
+            var newElement = (Element)newValue;
+            if (newElement != null)
+            {
+                BindableObject.SetInheritedBindingContext(newElement, bindable.BindingContext);
+            }
         });
 
         /// <summary>