[NUI] 1.Remove disposed instance from XamlResource; 2.Support BindingContext in EXaml
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / XamlBinding / Element.cs
index 9eb3f39..ea7c48a 100755 (executable)
@@ -515,7 +515,10 @@ namespace Tizen.NUI.Binding
             if (this.TryGetResource(key, out value))
                 OnResourceChanged(property, value);
 
-            Tizen.NUI.Application.AddResourceChangedCallback(this, (this as Element).OnResourcesChanged);
+            if (null != Application.Current)
+            {
+                Application.Current.XamlResourceChanged += OnResourcesChanged;
+            }
         }
 
         internal event EventHandler ParentSet;