From 1c7b037620e7deba8aeb93481edcddda4ca3fb66 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Mon, 27 May 2024 22:17:24 +0900 Subject: [PATCH] [NUI] Fix View preload sequences --- src/Tizen.NUI/src/internal/Application/Application.cs | 6 ------ src/Tizen.NUI/src/public/BaseComponents/View.cs | 17 ++++------------- .../src/public/BaseComponents/ViewBindableProperty.cs | 1 + 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Application/Application.cs b/src/Tizen.NUI/src/internal/Application/Application.cs index 7bdb603..47509b8 100755 --- a/src/Tizen.NUI/src/internal/Application/Application.cs +++ b/src/Tizen.NUI/src/internal/Application/Application.cs @@ -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(); diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 078a98f..d414854 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -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; - // } } /// diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs index 719dab3..aaaa966 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs @@ -3494,6 +3494,7 @@ namespace Tizen.NUI.BaseComponents // keep readonly for BindableProperty #endif + /// /// Gets View's Size2D set by user. /// -- 2.7.4