[NUI] Add SetPositionByLayout Property (#1497)
authorneostom432 <31119276+neostom432@users.noreply.github.com>
Mon, 30 Mar 2020 05:26:05 +0000 (14:26 +0900)
committerGitHub <noreply@github.com>
Mon, 30 Mar 2020 05:26:05 +0000 (14:26 +0900)
* [NUI] Add SetPositionByLayout Property

If true, set position by layouting result.
If false, will not set position in SetFrame because it means it's parent like
RecyclerList will set position.

* [NUI] remove tizen tag from SetPositionByLayout

src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index e29d518..7ad9b42 100755 (executable)
@@ -74,6 +74,12 @@ namespace Tizen.NUI
          public bool LayoutWithTransition{get; set;}
 
         /// <summary>
+        /// [Draft] Set position by layouting result
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool SetPositionByLayout{get;set;} = true;
+
+        /// <summary>
         /// [Draft] Margin for this LayoutItem
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
@@ -535,7 +541,10 @@ namespace Tizen.NUI
                 else
                 {
                     Owner.Size = new Size(right - left, bottom - top, Owner.Position.Z);
-                    Owner.Position = new Position(left, top, Owner.Position.Z);
+                    if(SetPositionByLayout)
+                    {
+                        Owner.Position = new Position(left, top, Owner.Position.Z);
+                    }
                 }