[EXaml] Support extension type in collection property
authorFang Xiaohui <xiaohui.fang@samsung.com>
Fri, 16 Jul 2021 06:55:07 +0000 (14:55 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 19 Jul 2021 09:01:03 +0000 (18:01 +0900)
src/Tizen.NUI/src/internal/EXaml/Operation/AddToCollectionProperty.cs

index 6494e55..b057134 100755 (executable)
@@ -22,6 +22,7 @@ using System.Text;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Binding;
 using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
 
 namespace Tizen.NUI.EXaml
 {
@@ -45,12 +46,15 @@ namespace Tizen.NUI.EXaml
                 if (value is Instance)
                 {
                     int valueIndex = (value as Instance).Index;
-                    collection.Add(globalDataList.GatheredInstances[valueIndex]);
+                    value = globalDataList.GatheredInstances[valueIndex];
                 }
-                else
+
+                if (value is IMarkupExtension markupExtension)
                 {
-                    collection.Add(value);
+                    value = markupExtension.ProvideValue(null);
                 }
+
+                collection.Add(value);
             }
         }