[NUI][API10] Change property get/set not to use PropertyValue (patch set5)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / ViewPublicMethods.cs
index 50724b9..d595446 100755 (executable)
@@ -54,6 +54,14 @@ namespace Tizen.NUI.BaseComponents
                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
                                                  object initialValue = null)
         {
+#if NUI_VISUAL_PROPERTY_CHANGE_1
+            if (IsBackgroundEmpty())
+            {
+                // If there is no background yet, ensure there is a transparent
+                // color visual
+                BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+            }
+#else
             Tizen.NUI.PropertyMap background = Background;
 
             if (background.Empty())
@@ -63,6 +71,7 @@ namespace Tizen.NUI.BaseComponents
                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
                 background = Background;
             }
+#endif
             return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
         }