Merge "Fix Left/Right/Up/DownFocusableView bug =>If app set the Left/Right/Up/DownFoc...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
index 02ff6ba..f312226 100755 (executable)
@@ -1097,6 +1097,8 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
             internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
             internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
+            internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
+            internal static readonly int PADDINGEX = NDalicPINVOKE.View_Property_PADDING_get();
         }
 
         /// <summary>
@@ -1912,7 +1914,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                LeftFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    LeftFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    LeftFocusableViewId = -1;
+                }
             }
         }
 
@@ -1935,7 +1944,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                RightFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    RightFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    RightFocusableViewId = -1;
+                }
             }
         }
 
@@ -1958,7 +1974,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                UpFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    UpFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    UpFocusableViewId = -1;
+                }
             }
         }
 
@@ -1981,7 +2004,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                DownFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    DownFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    DownFocusableViewId = -1;
+                }
             }
         }
 
@@ -4424,6 +4454,40 @@ namespace Tizen.NUI.BaseComponents
                 SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
             }
         }
+
+        /// <summary>
+        /// Gets or sets the Margin for use in layout.
+        /// </summary>
+        public Extents Margin
+        {
+            get
+            {
+                Extents temp = new Extents(0, 0, 0, 0);
+                GetProperty(View.Property.MARGIN).Get(temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.MARGIN, new Tizen.NUI.PropertyValue(value));
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the Padding for use in layout.
+        /// </summary>
+        public Extents PaddingEX
+        {
+            get
+            {
+                Extents temp = new Extents(0, 0, 0, 0);
+                GetProperty(View.Property.PADDINGEX).Get(temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(View.Property.PADDINGEX, new Tizen.NUI.PropertyValue(value));
+            }
+        }
     }
 
     /// <summary>
@@ -4441,4 +4505,4 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         RTL
     }
-}
\ No newline at end of file
+}