[NUI] Fixed TCT failed issues (#1177)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / Tab.cs
index 93e8a03..96fca90 100755 (executable)
@@ -228,7 +228,10 @@ namespace Tizen.NUI.Components
                     {
                         Style.UnderLine.BackgroundColor = new ColorSelector();
                     }
-                    Style.UnderLine.BackgroundColor.All = value;
+                    if (Style.UnderLine.BackgroundColor != null)
+                    {
+                        Style.UnderLine.BackgroundColor.All = value;
+                    }
                     //RelayoutRequest();
                 }
             }
@@ -251,7 +254,10 @@ namespace Tizen.NUI.Components
                 {
                     Style.Text.PointSize = new FloatSelector();
                 }
+                if (Style.Text.PointSize != null)
+                {
                 Style.Text.PointSize.All = value;
+                }
                 //RelayoutRequest();
             }
         }
@@ -291,11 +297,15 @@ namespace Tizen.NUI.Components
                 {
                     Style.Text.TextColor = new ColorSelector();
                 }
-                Style.Text.TextColor.All = value;
+                if (Style.Text.TextColor != null)
+                {
+                    Style.Text.TextColor.All = value;
+                }
                 //RelayoutRequest();
             }
         }
 
+        private ColorSelector textColorSelector = new ColorSelector();
         /// <summary>
         /// Text color selector in Tab.
         /// </summary>
@@ -304,19 +314,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (ColorSelector)Style.Text.TextColor;
+                return textColorSelector;
             }
             set
             {
-                if (value != null)
-                {
-                    //CreateTextAttributes();
-                    Style.Text.TextColor = value.Clone() as ColorSelector;
-                    //RelayoutRequest();
-                }
+                textColorSelector.Clone(value);
             }
         }
 
+
         /// <summary>
         /// Add tab item by item data. The added item will be added to end of all items automatically.
         /// </summary>