[NUI] Fix View preload sequences
authordongsug.song <dongsug.song@samsung.com>
Mon, 27 May 2024 13:17:24 +0000 (22:17 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 30 May 2024 09:45:08 +0000 (18:45 +0900)
src/Tizen.NUI/src/internal/Application/Application.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs

index 7bdb6032ece77534f736a0dadb04b31e1c5d223f..47509b8f370cb319418cf76322c3a5bc57dd9eec 100755 (executable)
@@ -690,12 +690,6 @@ namespace Tizen.NUI
             ProcessorController.Instance.Initialize();
             Tizen.Tracer.End();
 
-#if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
-            if(NUIApplication.IsUsingXaml)
-            {
-                Tizen.NUI.BaseComponents.View.CreateBindableProperties();
-            }
-#endif
             Log.Info("NUI", "[NUI] OnApplicationInit: GetWindow");
             Tizen.Tracer.Begin("[NUI] OnApplicationInit: GetWindow");
             Window.Instance = GetWindow();
index 078a98f61711bee99197127728ac93d5334f757f..d414854b261125e5db50b9e1e68a39bc89903c25 100755 (executable)
@@ -89,11 +89,11 @@ namespace Tizen.NUI.BaseComponents
 
         static View()
         {
-#if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
-            //to get "IsUsingXaml" feature working at preload, we need to remove readonly for BindableProperty.
-#else
             if (NUIApplication.IsUsingXaml)
             {
+#if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
+                CreateBindableProperties();
+#else
                 StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty,
                     propertyChanged: SetInternalStyleNameProperty, defaultValueCreator: GetInternalStyleNameProperty);
 
@@ -439,23 +439,14 @@ namespace Tizen.NUI.BaseComponents
                 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
                 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
                 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
-            }
 #endif
+            }
             RegisterAccessibilityDelegate();
         }
 
         static internal new void Preload()
         {
             Container.Preload();
-
-            // not needed, at preload, APP can not set the "IsUsingXaml" flag, it have the default value at preload
-            // if (NUIApplication.IsUsingXaml)
-            // {
-            //     // Do nothing. Just call for load static values.
-            //     var temporalPositionPropertyGroup = positionPropertyGroup;
-            //     var temporalSizePropertyGroup = sizePropertyGroup;
-            //     var temporalScalePropertyGroup = scalePropertyGroup;
-            // }
         }
 
         /// <summary>
index 719dab3efc242e9c688dbf4701767c246c4870cf..aaaa966fb20b35d40b08fee5f961a20458b8f843 100755 (executable)
@@ -3494,6 +3494,7 @@ namespace Tizen.NUI.BaseComponents
         // keep readonly for BindableProperty
 #endif
 
+
         /// <summary>
         /// Gets View's Size2D set by user.
         /// </summary>