[NUI] Add SetPositionByLayout Property (#1498)
authorneostom432 <31119276+neostom432@users.noreply.github.com>
Mon, 30 Mar 2020 05:26:01 +0000 (14:26 +0900)
committerGitHub <noreply@github.com>
Mon, 30 Mar 2020 05:26:01 +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 e29d518018f3aaf886d67fd92fa0c8255e0056f5..7ad9b429589a46a41c407a2d99267a5ad168da4d 100755 (executable)
@@ -73,6 +73,12 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
          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>
@@ -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);
+                    }
                 }