[NUI.Components]Fix svace issue (#1169)
authorXianbing Teng <xb.teng@samsung.com>
Mon, 9 Dec 2019 01:43:48 +0000 (09:43 +0800)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Mon, 9 Dec 2019 01:43:48 +0000 (10:43 +0900)
13 files changed:
src/Tizen.NUI.Components/Controls/Button.cs
src/Tizen.NUI.Components/Controls/DropDown.cs
src/Tizen.NUI.Components/Controls/ImageControl.cs
src/Tizen.NUI.Components/Controls/InputField.cs
src/Tizen.NUI.Components/Controls/Loading.cs
src/Tizen.NUI.Components/Controls/Popup.cs
src/Tizen.NUI.Components/Controls/Progress.cs
src/Tizen.NUI.Components/Controls/Scrollbar.cs
src/Tizen.NUI.Components/Controls/SelectButton.cs
src/Tizen.NUI.Components/Controls/Slider.cs
src/Tizen.NUI.Components/Controls/Switch.cs
src/Tizen.NUI.Components/Controls/Tab.cs
src/Tizen.NUI.Components/Controls/Toast.cs

index 719dea2..ce29a8a 100755 (executable)
@@ -193,11 +193,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text.Text.GetValue(ControlState);
+                return Style?.Text?.Text?.GetValue(ControlState);
             }
             set
             {
-                Style.Text.Text = value;
+                if (null != Style?.Text)
+                {
+                    Style.Text.Text = value;
+                }
             }
         }
 
@@ -241,13 +244,9 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (value != null)
+                if (null != Style?.Text)
                 {
-                    if (Style.Text.TranslatableText == null)
-                    {
-                        Style.Text.TranslatableText = new Selector<string>();
-                    }
-                    Style.Text.TranslatableText.All = value;
+                    Style.Text.TranslatableText = value;
                 }
             }
         }
@@ -264,11 +263,10 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (Style.Text.PointSize == null)
+                if (null != Style?.Text)
                 {
-                    Style.Text.PointSize = new Selector<float?>();
+                    Style.Text.PointSize = value;
                 }
-                Style.Text.PointSize.All = value;
             }
         }
 
@@ -284,7 +282,10 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                Style.Text.FontFamily = value;
+                if (null != Style?.Text)
+                {
+                    Style.Text.FontFamily = value;
+                }
             }
         }
         /// <summary>
@@ -299,11 +300,10 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (Style.Text.TextColor == null)
+                if (null != Style?.Text)
                 {
-                    Style.Text.TextColor = new Selector<Color>();
+                    Style.Text.TextColor = value;
                 }
-                Style.Text.TextColor.All = value;
             }
         }
         /// <summary>
@@ -318,7 +318,10 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                Style.Text.HorizontalAlignment = value;
+                if (null != Style?.Text)
+                {
+                    Style.Text.HorizontalAlignment = value;
+                }
             }
         }
         /// <summary>
@@ -333,13 +336,9 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (value != null)
+                if (null != Style?.Icon)
                 {
-                    if (Style.Icon.ResourceUrl == null)
-                    {
-                        Style.Icon.ResourceUrl = new Selector<string>();
-                    }
-                    Style.Icon.ResourceUrl.All = value;
+                    Style.Icon.ResourceUrl = value;
                 }
             }
         }
@@ -355,7 +354,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style.Text)
                 {
                     Style.Text.Text = value.Clone() as StringSelector;
                 }
@@ -373,7 +372,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Text)
                 {
                     Style.Text.TranslatableText = value.Clone() as StringSelector;
                 }
@@ -392,7 +391,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if(value != null)
+                if(null != value && null != Style.Text)
                 {
                     Style.Text.TextColor = value.Clone() as ColorSelector;
                 }
@@ -411,7 +410,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Text)
                 {
                     Style.Text.PointSize = value.Clone() as FloatSelector;
                 }
@@ -430,7 +429,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Icon)
                 {
                     Style.Icon.ResourceUrl = value.Clone() as StringSelector;
                 }
@@ -533,11 +532,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Icon.Padding;
+                return Style?.Icon?.Padding;
             }
             set
             {
-                if (null != value)
+                if (null != value && null != Style?.Icon?.Padding)
                 {
                     Style.Icon.Padding.CopyFrom(value);
                 }
@@ -552,11 +551,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text.Padding;
+                return Style?.Text?.Padding;
             }
             set
             {
-                if (null != value)
+                if (null != value && null != Style?.Text?.Padding)
                 {
                     Style.Text.Padding.CopyFrom(value);
                 }
index 8bc7569..b946f60 100755 (executable)
@@ -292,10 +292,8 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DeleteItem(int index)
         {
-            if(index < 0 || index >= adapter.GetItemCount())
-            {
-                return;
-            }
+            if (index < 0 || index >= adapter?.GetItemCount()) return;
+            if (null == dropDownMenuFullList) return;
 
             if (selectedItemIndex == index)
             {
@@ -306,7 +304,7 @@ namespace Tizen.NUI.Components
                 selectedItemIndex--;
             }
 
-            adapter.RemoveData(index);
+            adapter?.RemoveData(index);
 
             if(index < dropDownMenuFullList.ChildCount)
             {
@@ -681,10 +679,12 @@ namespace Tizen.NUI.Components
 
         private void UpdateSelectedItem(int index)
         {
+            if (null == adapter) return;
+            if (null == dropDownMenuFullList) return;
             if (selectedItemIndex != -1)
             {
                 DropDownDataItem data = adapter.GetData(selectedItemIndex);
-                if(data != null)
+                if(null != data)
                 {
                     data.IsSelected = false;
                 }
@@ -696,7 +696,7 @@ namespace Tizen.NUI.Components
             if (index != -1)
             {
                 DropDownDataItem data = adapter.GetData(index);
-                if (data != null)
+                if (null != data)
                 {
                     data.IsSelected = true;
                     DropDownItemView listItemView = dropDownMenuFullList?.GetChildAt((uint)index) as DropDownItemView;
@@ -831,7 +831,7 @@ namespace Tizen.NUI.Components
                 }
                 set
                 {
-                    if (null == itemDataStyle.BackgroundColor)
+                    if (null == itemDataStyle?.BackgroundColor)
                     {
                         itemDataStyle.BackgroundColor = new Selector<Color>();
                     }
index 16093ba..df9fe41 100755 (executable)
@@ -89,9 +89,8 @@ namespace Tizen.NUI.Components
                     imageView = new ImageView();
                     this.Add(imageView);
                 }
+                imageView.ApplyStyle(imageControlStyle.Image);
             }
-
-            imageView.ApplyStyle(imageControlStyle.Image);
         }
 
         /// <summary>
index 3b67ce2..4427c8d 100755 (executable)
@@ -95,11 +95,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.Text;
+                return textField?.Text;
             }
             set
             {
-                textField.Text = value;
+                if (null != textField) textField.Text = value;
             }
         }
 
@@ -113,11 +113,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.PlaceholderText;
+                return textField?.PlaceholderText;
             }
             set
             {
-                textField.PlaceholderText = value;
+                if (null != textField) textField.PlaceholderText = value;
             }
         }
 
@@ -131,17 +131,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.TextColor;
+                return textField?.TextColor;
             }
             set
             {
                 CreateTextFieldAttributes();
-                if (null == inputFieldAttrs.InputBoxAttributes.TextColor)
+                if (null != inputFieldAttrs?.InputBoxAttributes)
                 {
-                    inputFieldAttrs.InputBoxAttributes.TextColor = new Selector<Color>();
+                    inputFieldAttrs.InputBoxAttributes.TextColor = value;
+                    if (null != textField) textField.TextColor = value;
                 }
-                inputFieldAttrs.InputBoxAttributes.TextColor.All = value;
-                textField.TextColor = value;
             }
         }
 
@@ -155,17 +154,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.PlaceholderTextColor;
+                return textField?.PlaceholderTextColor;
             }
             set
             {
                 CreateTextFieldAttributes();
-                if (null == inputFieldAttrs.InputBoxAttributes.PlaceholderTextColor)
+                if (null != inputFieldAttrs?.InputBoxAttributes)
                 {
-                    inputFieldAttrs.InputBoxAttributes.PlaceholderTextColor = new Selector<Color>();
+                    inputFieldAttrs.InputBoxAttributes.PlaceholderTextColor = value;
+                    if (null != textField) textField.PlaceholderTextColor = value;
                 }
-                inputFieldAttrs.InputBoxAttributes.PlaceholderTextColor.All = value;
-                textField.PlaceholderTextColor = value;
             }
         }
 
@@ -179,17 +177,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.PrimaryCursorColor;
+                return textField?.PrimaryCursorColor;
             }
             set
             {
                 CreateTextFieldAttributes();
-                if (null == inputFieldAttrs.InputBoxAttributes.PrimaryCursorColor)
+                if (null == inputFieldAttrs?.InputBoxAttributes)
                 {
-                    inputFieldAttrs.InputBoxAttributes.PrimaryCursorColor = new Selector<Color>();
+                    inputFieldAttrs.InputBoxAttributes.PrimaryCursorColor = value;
+                    if (null != textField) textField.PrimaryCursorColor = value;
                 }
-                inputFieldAttrs.InputBoxAttributes.PrimaryCursorColor.All = value;
-                textField.PrimaryCursorColor = value;
             }
         }
 
@@ -203,13 +200,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.FontFamily;
+                return textField?.FontFamily;
             }
             set
             {
                 CreateTextFieldAttributes();
-                inputFieldAttrs.InputBoxAttributes.FontFamily = value;
-                textField.FontFamily = value;
+                if (null != inputFieldAttrs?.InputBoxAttributes)
+                {
+                    inputFieldAttrs.InputBoxAttributes.FontFamily = value;
+                    if (null != textField) textField.FontFamily = value;
+                }
             }
         }
 
@@ -223,13 +223,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.EnableCursorBlink;
+                return textField?.EnableCursorBlink ?? false;
             }
             set
             {
                 CreateTextFieldAttributes();
-                inputFieldAttrs.InputBoxAttributes.EnableCursorBlink = value;
-                textField.EnableCursorBlink = value;
+                if (null != inputFieldAttrs.InputBoxAttributes)
+                {
+                    inputFieldAttrs.InputBoxAttributes.EnableCursorBlink = value;
+                    if (null != textField) textField.EnableCursorBlink = value;
+                }
             }
         }
 
@@ -243,13 +246,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.EnableSelection;
+                return textField?.EnableSelection ?? false;
             }
             set
             {
                 CreateTextFieldAttributes();
-                inputFieldAttrs.InputBoxAttributes.EnableSelection = value;
-                textField.EnableSelection = value;
+                if (null != inputFieldAttrs?.InputBoxAttributes)
+                {
+                    inputFieldAttrs.InputBoxAttributes.EnableSelection = value;
+                    if (null != textField) textField.EnableSelection = value;
+                }
             }
         }
 
@@ -263,13 +269,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.CursorWidth;
+                return textField?.CursorWidth ?? 0;
             }
             set
             {
                 CreateTextFieldAttributes();
-                inputFieldAttrs.InputBoxAttributes.CursorWidth = value;
-                textField.CursorWidth = value;
+                if (null != inputFieldAttrs.InputBoxAttributes)
+                {
+                    inputFieldAttrs.InputBoxAttributes.CursorWidth = value;
+                    if (null != textField) textField.CursorWidth = value;
+                }
             }
         }
 
@@ -283,13 +292,16 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return textField.Ellipsis;
+                return textField?.Ellipsis ?? false;
             }
             set
             {
                 CreateTextFieldAttributes();
-                inputFieldAttrs.InputBoxAttributes.Ellipsis = value;
-                textField.Ellipsis = value;
+                if (null != inputFieldAttrs.InputBoxAttributes)
+                {
+                    inputFieldAttrs.InputBoxAttributes.Ellipsis = value;
+                    if (null != textField) textField.Ellipsis = value;
+                }
             }
         }
 
@@ -303,18 +315,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return inputFieldAttrs.BackgroundImageAttributes?.ResourceUrl?.All;
+                return inputFieldAttrs?.BackgroundImageAttributes?.ResourceUrl?.All;
             }
             set
             {
-                if (value != null)
+                CreateBackgroundAttributes();
+                if (null != inputFieldAttrs?.BackgroundImageAttributes)
                 {
-                    CreateBackgroundAttributes();
-                    if (inputFieldAttrs.BackgroundImageAttributes.ResourceUrl == null)
-                    {
-                        inputFieldAttrs.BackgroundImageAttributes.ResourceUrl = new Selector<string>();
-                    }
-                    inputFieldAttrs.BackgroundImageAttributes.ResourceUrl.All = value;
+                    inputFieldAttrs.BackgroundImageAttributes.ResourceUrl = value;
                     RelayoutRequest();
                 }
             }
@@ -330,18 +338,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return inputFieldAttrs.BackgroundImageAttributes?.Border?.All;
+                return inputFieldAttrs?.BackgroundImageAttributes?.Border?.All;
             }
             set
             {
-                if (value != null)
+                CreateBackgroundAttributes();
+                if (null != inputFieldAttrs?.BackgroundImageAttributes)
                 {
-                    CreateBackgroundAttributes();
-                    if (inputFieldAttrs.BackgroundImageAttributes.Border == null)
-                    {
-                        inputFieldAttrs.BackgroundImageAttributes.Border = new Selector<Rectangle>();
-                    }
-                    inputFieldAttrs.BackgroundImageAttributes.Border.All = value;
+                    inputFieldAttrs.BackgroundImageAttributes.Border = value;
                     RelayoutRequest();
                 }
             }
@@ -354,12 +358,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return inputFieldAttrs.Space ?? 0;
+                return inputFieldAttrs?.Space ?? 0;
             }
             set
             {
-                inputFieldAttrs.Space = value;
-                RelayoutRequest();
+                if (null != inputFieldAttrs)
+                {
+                    inputFieldAttrs.Space = value;
+                    RelayoutRequest();
+                }
             }
         }
 
index 683261a..f2e6a52 100755 (executable)
@@ -53,8 +53,10 @@ namespace Tizen.NUI.Components
             {
                 Size size = (Size)newValue;
                 instance.Style.Size = size;
-                //insbase.Size = value;
-                instance.imageVisual.Size = new Size2D((int)size.Width, (int)size.Height);
+                if (null != instance.imageVisual)
+                {
+                    instance.imageVisual.Size = new Size2D((int)size.Width, (int)size.Height);
+                }
             }
         },
         defaultValueCreator: (bindable) =>
index bc77658..c7fa6d5 100755 (executable)
@@ -53,12 +53,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                if (instance.Style.ShadowOffset == null)
+                if (null != instance.Style)
                 {
-                    instance.Style.ShadowOffset = new Vector4(0, 0, 0, 0);
+                    instance.Style.ShadowOffset = (Vector4)newValue;
+                    instance.UpdateShadow();
                 }
-                instance.Style.ShadowOffset = (Vector4)newValue;
-                instance.UpdateShadow();
             }
         },
         defaultValueCreator: (bindable) =>
@@ -74,8 +73,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                instance.Style.Buttons.Size.Height = (int)newValue;
-                instance.UpdateButton();
+                if (null != instance.Style?.Buttons?.Size)
+                {
+                    instance.Style.Buttons.Size.Height = (int)newValue;
+                    instance.UpdateButton();
+                }
             }
         },
         defaultValueCreator: (bindable) =>
@@ -91,12 +93,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                if (instance.Style.Buttons.Text.PointSize == null)
+                if (null != instance.Style?.Buttons?.Text)
                 {
-                    instance.Style.Buttons.Text.PointSize = new Selector<float?>();
+                    instance.Style.Buttons.Text.PointSize = (float)newValue;
+                    instance.UpdateButton();
                 }
-                instance.Style.Buttons.Text.PointSize.All = (float)newValue;
-                instance.UpdateButton();
             }
         },
         defaultValueCreator: (bindable) =>
@@ -112,8 +113,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                instance.Style.Buttons.Text.FontFamily = (string)newValue;
-                instance.UpdateButton();
+                if (null != instance.Style?.Buttons?.Text)
+                {
+                    instance.Style.Buttons.Text.FontFamily = (string)newValue;
+                    instance.UpdateButton();
+                }
             }
         },
         defaultValueCreator: (bindable) =>
@@ -128,13 +132,11 @@ namespace Tizen.NUI.Components
         {
             var instance = (Popup)bindable;
             if (newValue != null)
-            {  
-                if (instance.Style.Buttons.Text.TextColor == null)
+            {
+                if (null != instance.Style?.Buttons?.Text)
                 {
-                    instance.Style.Buttons.Text.TextColor = new Selector<Color>();
+                    instance.Style.Buttons.Text.TextColor = (Color)newValue;
                 }
-                instance.Style.Buttons.Text.TextColor.All = (Color)newValue;
-                //instance.UpdateButton();
             }
         },
         defaultValueCreator: (bindable) =>
@@ -150,8 +152,16 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                instance.Style.Buttons.Overlay.BackgroundColor = (Selector<Color>)newValue;
-                instance.UpdateButton();
+                if (null != instance.Style?.Buttons?.Overlay)
+                {
+                    Selector<Color> color = (Selector<Color>)newValue;
+                    if (null == instance.Style.Buttons.Overlay.BackgroundColor)
+                    {
+                        instance.Style.Buttons.Overlay.BackgroundColor = new Selector<Color>();
+                    }
+                    instance.Style.Buttons.Overlay.BackgroundColor.Clone(color);
+                    instance.UpdateButton();
+                }
             }
         },
         defaultValueCreator: (bindable) =>
@@ -167,8 +177,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                instance.Style.Buttons.Text.HorizontalAlignment = (HorizontalAlignment)newValue;
-                instance.UpdateButton();
+                if (null != instance.Style?.Buttons?.Text)
+                {
+                    instance.Style.Buttons.Text.HorizontalAlignment = (HorizontalAlignment)newValue;
+                    instance.UpdateButton();
+                }
             }
         },
         defaultValueCreator: (bindable) =>
@@ -184,12 +197,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                if (instance.Style.Buttons.Background.ResourceUrl == null)
+                if (null != instance.Style?.Buttons?.Background)
                 {
-                    instance.Style.Buttons.Background.ResourceUrl = new Selector<string>();
+                    instance.Style.Buttons.Background.ResourceUrl = (string)newValue;
+                    instance.UpdateButton();
                 }
-                instance.Style.Buttons.Background.ResourceUrl.All = (string)newValue;
-                instance.UpdateButton();
             }
         },
         defaultValueCreator: (bindable) =>
@@ -205,12 +217,11 @@ namespace Tizen.NUI.Components
             var instance = (Popup)bindable;
             if (newValue != null)
             {
-                if (instance.Style.Buttons.Background.Border == null)
+                if (null != instance.Style?.Buttons?.Background)
                 {
-                    instance.Style.Buttons.Background.Border = new Selector<Rectangle>();
+                    instance.Style.Buttons.Background.Border = (Rectangle)newValue;
+                    instance.UpdateButton();
                 }
-                instance.Style.Buttons.Background.Border.All = (Rectangle)newValue;
-                instance.UpdateButton();
             }
         },
         defaultValueCreator: (bindable) =>
@@ -276,20 +287,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Title?.Text?.All;
+                return Style?.Title?.Text?.All;
             }
             set
             {
-                if (value != null)
+                if (null != Style?.Title)
                 {
-                    //CreateTitleTextAttributes();
-                    if (Style.Title.Text == null)
-                    {
-                        Style.Title.Text = new StringSelector();
-                    }
-                    Style.Title.Text.All = value;
-
-                    //RelayoutRequest();
+                    Style.Title.Text = value;
                 }
             }
         }
@@ -302,17 +306,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Title?.PointSize?.All ?? 0;
+                return Style?.Title?.PointSize?.All ?? 0;
             }
             set
             {
-                //CreateTitleTextAttributes();
-                if (Style.Title.PointSize == null)
+                if (null != Style?.Title)
                 {
-                    Style.Title.PointSize = new FloatSelector();
+                    Style.Title.PointSize = value;
                 }
-                Style.Title.PointSize.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -324,17 +325,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Title?.TextColor?.All;
+                return Style?.Title?.TextColor?.All;
             }
             set
             {
-                //CreateTitleTextAttributes();
-                if (Style.Title.TextColor == null)
+                if (null != Style?.Title)
                 {
-                    Style.Title.TextColor = new ColorSelector();
+                    Style.Title.TextColor = value;
                 }
-                Style.Title.TextColor.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -346,13 +344,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Title?.HorizontalAlignment ?? HorizontalAlignment.Center;
+                return Style?.Title?.HorizontalAlignment ?? HorizontalAlignment.Center;
             }
             set
             {
-                //CreateTitleTextAttributes();
                 Style.Title.HorizontalAlignment = value;
-                //RelayoutRequest();
             }
         }
 
@@ -364,13 +360,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Title?.Position ?? new Position(0, 0, 0);
+                return Style?.Title?.Position ?? new Position(0, 0, 0);
             }
             set
             {
-                //CreateTitleTextAttributes();
                 Style.Title.Position = value;
-                //RelayoutRequest();
             }
         }
 
@@ -382,13 +376,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (int)(Style.Title?.Size?.Height ?? 0);
+                return (int)(Style?.Title?.Size?.Height ?? 0);
             }
             set
             {
-                //CreateTitleTextAttributes();
                 Style.Title.Size.Height = value;
-                //RelayoutRequest();
             }
         }
 
@@ -744,24 +736,28 @@ namespace Tizen.NUI.Components
         private void UpdateButton()
         {
             if (buttonCount <= 0) return;
-            if (buttonTextList.Count != buttonCount) return;
+            if (null == buttonTextList || buttonTextList.Count != buttonCount) return;
 
-            if (buttonList != null)
+            if (null != buttonList)
             {
                 foreach (Button btn in buttonList)
                 {
-                    btn.ClickEvent -= ButtonClickEvent;
-                    this.Remove(btn);
-                    btn.Dispose();
+                    if (null != btn)
+                    {
+                        btn.ClickEvent -= ButtonClickEvent;
+                        this.Remove(btn);
+                        btn.Dispose();
+                    }
                 }
                 buttonList.Clear();
             }
 
-            int buttonWidth = Size2D.Width / buttonCount;
-            int buttonHeight = (int)Style.Buttons.Size.Height;
+            int sizeWidth = Size2D?.Width ?? 0;
+            int buttonWidth = sizeWidth / buttonCount;
+            int buttonHeight = (int)(Style?.Buttons?.Size?.Height ?? 0);
             for (int i = 0; i < buttonCount; i++)
             {             
-                Button btn = new Button(Style.Buttons);
+                Button btn = new Button(Style?.Buttons);
                 btn.Size2D = new Size2D(buttonWidth, buttonHeight);
                 btn.Style.Text.Text = buttonTextList[i];
                 btn.ClickEvent += ButtonClickEvent;
@@ -771,7 +767,7 @@ namespace Tizen.NUI.Components
             }
 
             int pos = 0;
-            if (buttonList != null && buttonList.Count > 0)
+            if (null != buttonList && buttonList.Count > 0)
             {
                 if (LayoutDirection == ViewLayoutDirectionType.RTL)
                 {
index 6045074..5008d90 100755 (executable)
@@ -203,17 +203,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Track?.ResourceUrl?.All;
+                return Style?.Track?.ResourceUrl?.All;
             }
             set
             {
-                //CreateTrackImageAttributes();
-                if (Style.Track.ResourceUrl == null)
+                if (null != Style?.Track)
                 {
-                    Style.Track.ResourceUrl = new StringSelector();
+                    Style.Track.ResourceUrl = value;
                 }
-                Style.Track.ResourceUrl.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -225,17 +222,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Progress?.ResourceUrl?.All;
+                return Style?.Progress?.ResourceUrl?.All;
             }
             set
             {
-                //CreateProgressImageAttributes();
-                if (Style.Progress.ResourceUrl == null)
+                if (null != Style?.Progress)
                 {
-                    Style.Progress.ResourceUrl = new StringSelector();
+                    Style.Progress.ResourceUrl = value;
                 }
-                Style.Progress.ResourceUrl.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -247,17 +241,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Buffer?.ResourceUrl?.All;
+                return Style?.Buffer?.ResourceUrl?.All;
             }
             set
             {
-                //CreateBufferImageAttributes();
-                if (Style.Buffer.ResourceUrl == null)
+                if (null != Style?.Buffer)
                 {
-                    Style.Buffer.ResourceUrl = new StringSelector();
+                    Style.Buffer.ResourceUrl = value;
+                    RelayoutRequest();
                 }
-                Style.Buffer.ResourceUrl.All = value;
-                RelayoutRequest();
             }
         }
 
@@ -269,17 +261,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Track?.BackgroundColor?.All;
+                return Style?.Track?.BackgroundColor?.All;
             }
             set
             {
-                //CreateTrackImageAttributes();
-                if (Style.Track.BackgroundColor == null)
+                if (null != Style?.Track)
                 {
-                    Style.Track.BackgroundColor = new ColorSelector();
+                    Style.Track.BackgroundColor = value;
                 }
-                Style.Track.BackgroundColor.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -291,17 +280,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Progress?.BackgroundColor?.All;
+                return Style?.Progress?.BackgroundColor?.All;
             }
             set
             {
-                //CreateProgressImageAttributes();
-                if (null == Style.Progress.BackgroundColor)
+                if (null != Style?.Progress)
                 {
-                    Style.Progress.BackgroundColor = new ColorSelector();
+                    Style.Progress.BackgroundColor = value;
                 }
-                Style.Progress.BackgroundColor.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -313,17 +299,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Buffer?.BackgroundColor?.All;
+                return Style?.Buffer?.BackgroundColor?.All;
             }
             set
             {
-                //CreateBufferImageAttributes();
-                if (null == Style.Buffer.BackgroundColor)
+                if (null != Style?.Buffer)
                 {
-                    Style.Buffer.BackgroundColor = new ColorSelector();
+                    Style.Buffer.BackgroundColor = value;
                 }
-                Style.Buffer.BackgroundColor.All = value;
-                //RelayoutRequest();
             }
         }
 
index e8b6fae..fe2be17 100755 (executable)
@@ -225,22 +225,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                if (Style.Thumb.Size == null)
-                {
-                    Style.Thumb.Size = new Size();
-                }
-                return Style.Thumb.Size;
+                return Style?.Thumb?.Size;
             }
             set
             {
-                if (Style.Thumb.Size == null)
-                {
-                    Style.Thumb.Size = new Size();
-                }
-                if (thumbImage != null)
+                if (null != Style?.Thumb)
                 {
-                    Style.Thumb.Size.Width = value.Width;
-                    Style.Thumb.Size.Height = value.Height;
+                    Style.Thumb.Size = value;
                     RelayoutRequest();
                 }
             }
@@ -254,19 +245,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Track.ResourceUrl.All;
+                return Style?.Track?.ResourceUrl?.All;
             }
             set
             {
-                if (trackImage != null)
+                if (null != Style?.Track)
                 {
-                    if (Style.Track.ResourceUrl == null)
-                    {
-                        Style.Track.ResourceUrl = new StringSelector();
-                    }
-                    Style.Track.ResourceUrl.All = value;
+                    Style.Track.ResourceUrl = value;
+                    RelayoutRequest();
                 }
-                RelayoutRequest();
             }
         }
 
@@ -278,19 +265,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Track.BackgroundColor?.All;
+                return Style?.Track?.BackgroundColor?.All;
             }
             set
             {
-                if (Style.Track.BackgroundColor == null)
+                if (null != Style?.Track)
                 {
-                    Style.Track.BackgroundColor = new ColorSelector { All = value };
-                }
-                else
-                {
-                    Style.Track.BackgroundColor.All = value;
+                    Style.Track.BackgroundColor = value;
+                    RelayoutRequest();
                 }
-                RelayoutRequest();
             }
         }
 
@@ -302,19 +285,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Thumb.BackgroundColor?.All;
+                return Style?.Thumb?.BackgroundColor?.All;
             }
             set
             {
-                if(Style.Thumb.BackgroundColor == null)
+                if(null != Style?.Thumb)
                 {
-                    Style.Thumb.BackgroundColor = new ColorSelector { All = value };
-                }
-                else
-                {
-                    Style.Thumb.BackgroundColor.All = value;
+                    Style.Thumb.BackgroundColor = value;
+                    RelayoutRequest();
                 }
-                RelayoutRequest();
             }
         }
 
index c444166..dfea788 100755 (executable)
@@ -114,10 +114,10 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
         {
-            SelectButtonStyle tempAttributes = StyleManager.Instance.GetAttributes(style) as SelectButtonStyle;
-            if (tempAttributes != null)
+            SelectButtonStyle selectButtonStyle = StyleManager.Instance.GetAttributes(style) as SelectButtonStyle;
+            if (null != selectButtonStyle)
             {
-                Style.CopyFrom(tempAttributes);
+                Style?.CopyFrom(selectButtonStyle);
                 UpdateUIContent();
             }
         }
@@ -258,7 +258,8 @@ namespace Tizen.NUI.Components
 
         private void Initialize()
         {
-            if (selectableImage == null)
+            if (null == Style) return;
+            if (null == selectableImage)
             {
                 selectableImage = new ImageControl();
                 selectableImage.Name = "SelectableImage";
@@ -267,9 +268,13 @@ namespace Tizen.NUI.Components
                 selectableImage.RaiseToTop();
             }
 
+            if (null == Style.SelectableImage)
+            {
+                Style.SelectableImage = new ImageControlStyle();
+            }
             Style.SelectableImage.PositionUsesPivotPoint = true;
-            Style.SelectableImage.ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft;
-            Style.SelectableImage.PivotPoint = Tizen.NUI.PivotPoint.TopLeft;
+            Style.SelectableImage.ParentOrigin = NUI.ParentOrigin.TopLeft;
+            Style.SelectableImage.PivotPoint = NUI.PivotPoint.TopLeft;
 
             Style.IsSelectable = true;
             LayoutDirectionChanged += SelectButtonLayoutDirectionChanged;
@@ -277,27 +282,31 @@ namespace Tizen.NUI.Components
 
         private void UpdateTextAttributes()
         {
-            if (Style.Text != null)
+            if (null == Style) return;
+            if (null == selectableImage) return;
+            if (null != Style.Text)
             {
                 Style.Text.PositionUsesPivotPoint = true;
-                Style.Text.ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft;
-                Style.Text.PivotPoint = Tizen.NUI.PivotPoint.TopLeft;
+                Style.Text.ParentOrigin = NUI.ParentOrigin.TopLeft;
+                Style.Text.PivotPoint = NUI.PivotPoint.TopLeft;
                 Style.Text.WidthResizePolicy = ResizePolicyType.Fixed;
                 Style.Text.HeightResizePolicy = ResizePolicyType.Fixed;
 
                 int iconWidth = (int)selectableImage.SizeWidth;
 
-                int textPaddingLeft = Style.Text.Padding.Start;
-                int textPaddingRight = Style.Text.Padding.End;
+                int textPaddingLeft = Style.Text.Padding?.Start ?? 0;
+                int textPaddingRight = Style.Text.Padding?.End ?? 0;
+                int imagePaddingStart = selectableImage.Padding?.Start ?? 0;
+                int imagePaddingEnd = selectableImage.Padding?.End ?? 0;
 
-                if(Style.Text.Size == null)
+                if (null == Style.Text.Size && null != Size2D)
                 {
-                    Style.Text.Size = new Size(Size2D.Width - iconWidth - selectableImage.Padding.Start - selectableImage.Padding.End - textPaddingLeft - textPaddingRight, Size2D.Height);
+                    Style.Text.Size = new Size(Size2D.Width - iconWidth - imagePaddingStart - imagePaddingEnd - textPaddingLeft - textPaddingRight, Size2D.Height);
                 }
                 
-                if(Style.Text.Position == null)
+                if(null == Style.Text.Position)
                 {
-                    Style.Text.Position = new Position(selectableImage.Padding.Start + iconWidth + selectableImage.Padding.End + textPaddingLeft, 0);
+                    Style.Text.Position = new Position(imagePaddingStart + iconWidth + imagePaddingEnd + textPaddingLeft, 0);
                 }
 
                 Style.Text.VerticalAlignment = VerticalAlignment.Center;
@@ -306,40 +315,46 @@ namespace Tizen.NUI.Components
 
         private void SelectButtonLayoutDirectionChanged(object sender, LayoutDirectionChangedEventArgs e)
         {
-            if (Style == null || Style.Text == null)
-            {
-                return;
-            }
+            if (null == Style || null == Style.Text) return;
+            if (null == selectableImage) return;
 
             UpdateTextAttributes();
 
             int iconWidth = (int)selectableImage.SizeWidth;
 
-            int textPaddingLeft = Style.Text.Padding.Start;
-            int textPaddingRight = Style.Text.Padding.End;
+            int textPaddingLeft = Style.Text.Padding?.Start ?? 0;
+            int textPaddingRight = Style.Text.Padding?.End ?? 0;
             int pos = 0;
+            int sizeWidth = (int)(Style.Text.Size?.Width ?? 0);
+            if (null == Style.Text.Position)
+            {
+                Style.Text.Position = new Position(0, 0, 0);
+            }
             if (LayoutDirection == ViewLayoutDirectionType.RTL)
             {
                 Style.Text.HorizontalAlignment = HorizontalAlignment.End;
+                
                 Style.Text.Position.X = textPaddingRight;
-                               pos = (int)(Style.Text.Size.Width) + textPaddingLeft + textPaddingRight;
-                if (Style.Icon.Padding != null)
-                               {
+                               pos = sizeWidth + textPaddingLeft + textPaddingRight;
+                if (null != Style.Icon?.Padding)
+                {
                     pos += Style.Icon.Padding.End;
-                               }
-
+                }
             }
             else if (LayoutDirection == ViewLayoutDirectionType.LTR)
             {
                 Style.Text.HorizontalAlignment = HorizontalAlignment.Begin;
                 Style.Text.Position.X = iconWidth + textPaddingLeft;
-                if (Style.Icon.Padding != null)
+                if (null != Style.Icon?.Padding)
                                {
                     Style.Text.Position.X += (Style.Icon.Padding.Start + Style.Icon.Padding.End); 
                     pos = Style.Icon.Padding.Start;
                                }
             }
-
+            if (null == selectableImage.Position2D)
+            {
+                selectableImage.Position2D = new Position2D(0, 0);
+            }
             selectableImage.Position2D.X = pos;
         }
 
index ed9aeea..b35b44d 100755 (executable)
@@ -407,15 +407,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Thumb?.ResourceUrl?.All;
+                return Style?.Thumb?.ResourceUrl?.All;
             }
             set
             {
-                if (Style.Thumb.ResourceUrl == null)
+                if (null != Style?.Thumb)
                 {
-                    Style.Thumb.ResourceUrl = new StringSelector()
+                    Style.Thumb.ResourceUrl = value
                 }
-                Style.Thumb.ResourceUrl.All = value;
             }
         }
 
@@ -427,11 +426,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style.Thumb?.ResourceUrl;
+                return (StringSelector)Style?.Thumb?.ResourceUrl;
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Thumb)
                 {
                     Style.Thumb.ResourceUrl = value.Clone() as StringSelector;
                 }
@@ -446,15 +445,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Track?.BackgroundColor?.All;
+                return Style?.Track?.BackgroundColor?.All;
             }
             set
             {
-                if (Style.Track.BackgroundColor == null)
+                if (null != Style?.Track)
                 {
-                    Style.Track.BackgroundColor = new ColorSelector();
+                    Style.Track.BackgroundColor = value;
                 }
-                Style.Track.BackgroundColor.All = value;
             }
         }
 
@@ -466,15 +464,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Progress?.BackgroundColor?.All;
+                return Style?.Progress?.BackgroundColor?.All;
             }
             set
             {
-                if (Style.Progress.BackgroundColor == null)
+                if (null != Style?.Progress)
                 {
-                    Style.Progress.BackgroundColor = new ColorSelector();
+                    Style.Progress.BackgroundColor = value;
                 }
-                Style.Progress.BackgroundColor.All = value;
             }
         }
 
@@ -535,15 +532,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.LowIndicatorImage?.ResourceUrl?.All;
+                return Style?.LowIndicatorImage?.ResourceUrl?.All;
             }
             set
             {
-                if (Style.LowIndicatorImage.ResourceUrl == null)
+                if (null != Style?.LowIndicatorImage)
                 {
-                    Style.LowIndicatorImage.ResourceUrl = new StringSelector();
+                    Style.LowIndicatorImage.ResourceUrl = value;
                 }
-                Style.LowIndicatorImage.ResourceUrl.All = value;
             }
         }
 
@@ -555,15 +551,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.HighIndicatorImage?.ResourceUrl?.All;
+                return Style?.HighIndicatorImage?.ResourceUrl?.All;
             }
             set
             {
-                if (Style.HighIndicatorImage.ResourceUrl == null)
+                if (null != Style?.HighIndicatorImage)
                 {
-                    Style.HighIndicatorImage.ResourceUrl = new StringSelector();
+                    Style.HighIndicatorImage.ResourceUrl = value;
                 }
-                Style.HighIndicatorImage.ResourceUrl.All = value;
             }
         }
 
@@ -575,15 +570,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.LowIndicator?.Text?.All;
+                return Style?.LowIndicator?.Text?.All;
             }
             set
             {
-                if (Style.LowIndicator.Text == null)
+                if (null != Style?.LowIndicator)
                 {
-                    Style.LowIndicator.Text = new StringSelector();
+                    Style.LowIndicator.Text= value;
                 }
-                Style.LowIndicator.Text.All = value;
             }
         }
 
@@ -595,15 +589,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.HighIndicator?.Text?.All;
+                return Style?.HighIndicator?.Text?.All;
             }
             set
             {
-                if (Style.HighIndicator.Text == null)
+                if (null != Style?.HighIndicator)
                 {
-                    Style.HighIndicator.Text = new StringSelector();
+                    Style.HighIndicator.Text = value;
                 }
-                Style.HighIndicator.Text.All = value;
             }
         }
 
index f1747fe..e1b1cc6 100755 (executable)
@@ -85,17 +85,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Track?.ResourceUrl?.All;
+                return Style?.Track?.ResourceUrl?.All;
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Track)
                 {
-                    if (Style.Track.ResourceUrl == null)
-                    {
-                        Style.Track.ResourceUrl = new StringSelector();
-                    }
-                    Style.Track.ResourceUrl.All = value;
+                    Style.Track.ResourceUrl = value;
                 }
             }
         }
@@ -108,11 +104,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style.Track?.ResourceUrl;
+                return (StringSelector)Style?.Track?.ResourceUrl;
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Track)
                 {
                     Style.Track.ResourceUrl = value.Clone() as StringSelector;
                 }
@@ -127,17 +123,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Thumb?.ResourceUrl?.All;
+                return Style?.Thumb?.ResourceUrl?.All;
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Thumb)
                 {
-                    if (Style.Thumb.ResourceUrl == null)
-                    {
-                        Style.Thumb.ResourceUrl = new StringSelector();
-                    }
-                    Style.Thumb.ResourceUrl.All = value;
+                    Style.Thumb.ResourceUrl = value;
                 }
             }
         }
@@ -150,11 +142,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style.Thumb?.ResourceUrl;
+                return (StringSelector)Style?.Thumb?.ResourceUrl;
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Thumb)
                 {
                     Style.Thumb.ResourceUrl = value.Clone() as StringSelector;
                 }
@@ -169,11 +161,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Thumb?.Size ?? new Size(0, 0);
+                return Style?.Thumb?.Size;
             }
             set
             {
-                Style.Thumb.Size = value;
+                if (null != Style?.Thumb)
+                {
+                    Style.Thumb.Size = value;
+                }
             }
         }
 
index 93e8a03..b6e206c 100755 (executable)
@@ -107,12 +107,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.UseTextNaturalSize;
+                return Style?.UseTextNaturalSize ?? false;
             }
             set
             {
-                Style.UseTextNaturalSize = value;
-                RelayoutRequest();
+                if (null != Style)
+                {
+                    Style.UseTextNaturalSize = value;
+                    RelayoutRequest();
+                }
             }
         }
 
@@ -124,12 +127,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.ItemSpace;
+                return Style?.ItemSpace ?? 0;
             }
             set
             {
-                Style.ItemSpace = value;
-                RelayoutRequest();
+                if (null != Style)
+                {
+                    Style.ItemSpace = value;
+                    RelayoutRequest();
+                }
             }
         }
 
@@ -163,7 +169,7 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                if(null != value)
+                if(null != value && null != Style?.ItemPadding)
                 {
                     Style.ItemPadding.CopyFrom(value);
 
@@ -196,15 +202,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.UnderLine?.Size;
+                return Style?.UnderLine?.Size;
             }
             set
             {
-                if (value != null)
+                if (null != Style?.UnderLine)
                 {
-                    //CreateUnderLineAttributes();
                     Style.UnderLine.Size = value;
-                    //RelayoutRequest();
                 }
             }
         }
@@ -217,19 +221,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.UnderLine?.BackgroundColor?.All;
+                return Style?.UnderLine?.BackgroundColor?.All;
             }
             set
             {
-                if (value != null)
+                if (null != Style?.UnderLine)
                 {
-                    //CreateUnderLineAttributes();
-                    if (Style.UnderLine.BackgroundColor == null)
-                    {
-                        Style.UnderLine.BackgroundColor = new ColorSelector();
-                    }
-                    Style.UnderLine.BackgroundColor.All = value;
-                    //RelayoutRequest();
+                    Style.UnderLine.BackgroundColor = value;
                 }
             }
         }
@@ -242,17 +240,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text?.PointSize?.All ?? 0;
+                return Style?.Text?.PointSize?.All ?? 0;
             }
             set
             {
-                //CreateTextAttributes();
-                if (Style.Text.PointSize == null)
+                if (null != Style?.Text)
                 {
-                    Style.Text.PointSize = new FloatSelector();
+                    Style.Text.PointSize = value;
                 }
-                Style.Text.PointSize.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -264,13 +259,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text?.FontFamily.All;
+                return Style?.Text?.FontFamily?.All;
             }
             set
             {
-                //CreateTextAttributes();
-                Style.Text.FontFamily.All = value;
-                //RelayoutRequest();
+                if (null != Style?.Text)
+                {
+                    Style.Text.FontFamily = value;
+                }
             }
         }
 
@@ -282,17 +278,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text?.TextColor?.All;
+                return Style?.Text?.TextColor?.All;
             }
             set
             {
-                //CreateTextAttributes();
-                if (Style.Text.TextColor == null)
+                if (null != Style?.Text)
                 {
-                    Style.Text.TextColor = new ColorSelector();
+                    Style.Text.TextColor = value;
                 }
-                Style.Text.TextColor.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -304,15 +297,13 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (ColorSelector)Style.Text.TextColor;
+                return (ColorSelector)Style?.Text?.TextColor;
             }
             set
             {
-                if (value != null)
+                if (null != value && null != Style?.Text)
                 {
-                    //CreateTextAttributes();
                     Style.Text.TextColor = value.Clone() as ColorSelector;
-                    //RelayoutRequest();
                 }
             }
         }
index 029ce56..56c8a59 100755 (executable)
@@ -161,15 +161,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (float)Style.Text?.PointSize?.All;
+                return (float)Style?.Text?.PointSize?.All;
             }
             set
             {
-                if (null == Style.Text.PointSize)
+                if (null != Style?.Text)
                 {
-                    Style.Text.PointSize = new FloatSelector();
+                    Style.Text.PointSize = value;
                 }
-                Style.Text.PointSize.All = value;
             }
         }
 
@@ -181,11 +180,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text?.FontFamily.All;
+                return Style?.Text?.FontFamily?.All;
             }
             set
             {
-                Style.Text.FontFamily = value;
+                if (null != Style?.Text)
+                {
+                    Style.Text.FontFamily = value;
+                }
             }
         }
 
@@ -197,17 +199,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text?.TextColor?.All;
+                return Style?.Text?.TextColor?.All;
             }
             set
             {
-                //CreateTextAttributes();
-                if (null == Style.Text.TextColor)
+                if (null != Style?.Text)
                 {
-                    Style.Text.TextColor = new ColorSelector();
+                    Style.Text.TextColor = value;
                 }
-                Style.Text.TextColor.All = value;
-                //RelayoutRequest();
             }
         }
 
@@ -219,13 +218,14 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return Style.Text?.HorizontalAlignment ?? HorizontalAlignment.Center;
+                return Style?.Text?.HorizontalAlignment ?? HorizontalAlignment.Center;
             }
             set
             {
-                //CreateTextAttributes();
-                Style.Text.HorizontalAlignment = value;
-                //RelayoutRequest();
+                if (null != Style?.Text)
+                {
+                    Style.Text.HorizontalAlignment = value;
+                }
             }
         }