[NUI] Avoid creation of property value in label
authorBowon Ryu <bowon.ryu@samsung.com>
Mon, 17 Mar 2025 06:00:40 +0000 (15:00 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Tue, 18 Mar 2025 06:08:52 +0000 (15:08 +0900)
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs

index d26dfc2437ea8b8a8be57cdf8400f845854c89c7..91b6ef8e864e345e3543d25e320add8996ce94ab 100755 (executable)
@@ -2277,15 +2277,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool IsScrolling
         {
-            get
-            {
-                bool isScrolling = false;
-                using (var propertyValue = GetProperty(TextLabel.Property.IsScrolling))
-                {
-                    propertyValue.Get(out isScrolling);
-                }
-                return isScrolling;
-            }
+            get => Object.InternalGetPropertyBool(SwigCPtr, Property.IsScrolling);
         }
 
         /// <summary>
@@ -2380,15 +2372,7 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public int LineCount
         {
-            get
-            {
-                int lineCount = 0;
-                using (var propertyValue = GetProperty(TextLabel.Property.LineCount))
-                {
-                    propertyValue.Get(out lineCount);
-                }
-                return lineCount;
-            }
+            get => Object.InternalGetPropertyInt(SwigCPtr, Property.LineCount);
         }
 
         /// <summary>
@@ -2440,15 +2424,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public TextDirection TextDirection
         {
-            get
-            {
-                int textDirection = 0;
-                using (var propertyValue = GetProperty(TextLabel.Property.TextDirection))
-                {
-                    propertyValue.Get(out textDirection);
-                }
-                return (TextDirection)textDirection;
-            }
+            get => (TextDirection)Object.InternalGetPropertyInt(SwigCPtr, Property.TextDirection);
         }
 
         /// <summary>
@@ -3258,15 +3234,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool ManualRendered
         {
-            get
-            {
-                bool manualRendered = false;
-                using (var propertyValue = GetProperty(TextLabel.Property.ManualRendered))
-                {
-                    propertyValue.Get(out manualRendered);
-                }
-                return manualRendered;
-            }
+            get => Object.InternalGetPropertyBool(SwigCPtr, Property.ManualRendered);
         }
 
         /// <summary>
@@ -3285,15 +3253,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public int AsyncLineCount
         {
-            get
-            {
-                int asyncLineCount = 0;
-                using (var propertyValue = GetProperty(TextLabel.Property.AsyncLineCount))
-                {
-                    propertyValue.Get(out asyncLineCount);
-                }
-                return asyncLineCount;
-            }
+            get => Object.InternalGetPropertyInt(SwigCPtr, Property.AsyncLineCount);
         }
 
         private TextLabelSelectorData EnsureSelectorData() => selectorData ?? (selectorData = new TextLabelSelectorData());