[NUI] Fix View preload sequences
authordongsug.song <dongsug.song@samsung.com>
Mon, 27 May 2024 13:17:24 +0000 (22:17 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Tue, 11 Jun 2024 10:37:05 +0000 (19:37 +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 b9deaa2e27e760afa57777e06e3b68f849d11b03..9f9551b9ee4ea7fd46320d0e43db107b5d795421 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 = Window.Default = GetWindow();
index c62e37d0733ce9e3e8561e3b302c01e0798a679c..41f5c8fb8c8373d55b6902431855dd761e90e6bc 100755 (executable)
@@ -96,11 +96,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);
 
@@ -446,23 +446,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 402bbe3e93f50d838797ec88c88ba7af0b290e62..ad15c6ccaecc0aee444a45659d16e89a26b14ee8 100755 (executable)
@@ -3501,6 +3501,7 @@ namespace Tizen.NUI.BaseComponents
         // keep readonly for BindableProperty
 #endif
 
+
         /// <summary>
         /// Gets View's Size2D set by user.
         /// </summary>