private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
+
internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
oldParent.Remove(child);
}
- if (child.Layout == null)
+ if (layoutSet == true && child.Layout == null) // Only give children a layout if parent an explicit container
{
LayoutItem layoutItem = new LayoutItem();
child.Layout = layoutItem;
{
Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
value.LayoutChildren.Clear();
+ layoutSet = true;
foreach (View view in Children)
{
value.LayoutChildren.Add(view.Layout);