LayoutItem item = LayoutChildren[i];
View view = item?.Owner;
if (view == null) continue;
- if (!item.Owner.ExcludeLayouting)
+ if (item.Owner.ExcludeLayouting)
{
gridChildCount++;
}
View view = item?.Owner;
if (view == null) continue;
- if (view.ExcludeLayouting)
+ if (!view.ExcludeLayouting)
{
MeasureChildWithoutPadding(item, widthMeasureSpec, heightMeasureSpec);
gridChildIndex--;
private bool controlStatePropagation = false;
private ViewStyle viewStyle;
private bool themeChangeSensitive = false;
- private bool excludeLayouting = false;
+ private bool excludeLayouting = true;
internal Size2D sizeSetExplicitly = new Size2D(); // Store size set by API, will be used in place of NaturalSize if not set.
internal BackgroundExtraData backgroundExtraData;
set
{
excludeLayouting = value;
- if (Layout != null && Layout.SetPositionByLayout == value)
+ if(Layout != null && Layout.SetPositionByLayout != value)
{
- Layout.SetPositionByLayout = !value;
+ Layout.SetPositionByLayout = value;
Layout.RequestLayout();
}
}
// Remove existing layout from it's parent layout group.
_layout?.Unparent();
- value.SetPositionByLayout = !excludeLayouting;
+ value.SetPositionByLayout = excludeLayouting;
// Set layout to this view
SetLayout(value);
// Get size of child with no padding, no margin. we won't support margin, padding for AbsolutLayout.
MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
continue;
}
if (childHandleRef.Handle == IntPtr.Zero || Child == null)
continue;
- if (layoutItem.Owner.ExcludeLayouting)
+ if (!layoutItem.Owner.ExcludeLayouting)
{
SetFlexPositionType(Child, PositionType.Absolute);
Interop.FlexLayout.FlexLayout_SetFlexPositionType(childHandleRef, (int)PositionType.Absolute);
LayoutItem childLayout = LayoutChildren[childIndex];
if (childLayout != null)
{
- if (!childLayout.Owner.ExcludeLayouting)
+ if (childLayout.Owner.ExcludeLayouting)
{
// Get the frame for the child, start, top, end, bottom.
Vector4 frame = new Vector4(Interop.FlexLayout.FlexLayout_GetNodeFrame(swigCPtr, childIndex), true);
}
/// <summary>
- /// Layout independent children those Owners have true ExcludeLayouting. <br />
+ /// Layout independent children those Owners have false ExcludeLayouting. <br />
/// These children are required not to be affected by this layout. <br />
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
LayoutItem childLayout = LayoutChildren[childIndex];
if (childLayout != null)
{
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
LayoutLength childWidth = childLayout.MeasuredWidth.Size;
LayoutLength childHeight = childLayout.MeasuredHeight.Size;
set
{
setPositionByLayout = value;
- if (Owner != null && Owner.ExcludeLayouting == value)
+ if (Owner != null && Owner.ExcludeLayouting != value)
{
- Owner.ExcludeLayouting = !value;
+ Owner.ExcludeLayouting = value;
}
}
}
else
{
// If height or width specification is not explicitly defined,
- // the size of the owner view must be reset even the ExcludeLayouting is true.
+ // the size of the owner view must be reset even the ExcludeLayouting is false.
if (Owner.HeightSpecification < 0 || Owner.WidthSpecification < 0)
{
Owner.SetSize(right.AsRoundedValue() - left.AsRoundedValue(), bottom.AsRoundedValue() - top.AsRoundedValue());
for (int i = 0; i < LayoutChildren.Count; i++)
{
LayoutItem childLayout = LayoutChildren[i];
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
continue;
for (int i = 0; i < numberOfChildren; ++i)
{
LayoutItem childLayout = LayoutChildren[i];
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
continue;
}
for (int i = 0; i < LayoutChildren.Count; i++)
{
LayoutItem childLayout = LayoutChildren[i];
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
continue;
for (int i = 0; i < numberOfChildren; ++i)
{
LayoutItem childLayout = LayoutChildren[i];
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
continue;
}
LayoutItem childLayout = LayoutChildren[childIndex];
if (childLayout != null)
{
- if (!childLayout.Owner.ExcludeLayouting)
+ if (childLayout.Owner.ExcludeLayouting)
{
LayoutLength childWidth = childLayout.MeasuredWidth.Size;
LayoutLength childHeight = childLayout.MeasuredHeight.Size;
LayoutItem childLayout = LayoutChildren[i];
if (childLayout != null)
{
- if (!childLayout.Owner.ExcludeLayouting)
+ if (childLayout.Owner.ExcludeLayouting)
{
LayoutLength childWidth = childLayout.MeasuredWidth.Size;
LayoutLength childHeight = childLayout.MeasuredHeight.Size;
MeasureSpecification uniformMeasureSpec = new MeasureSpecification(MeasuredHeight.Size, MeasureSpecification.ModeType.Exactly);
foreach (LayoutItem childLayout in LayoutChildren)
{
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
continue;
}
MeasureSpecification uniformMeasureSpec = new MeasureSpecification(MeasuredWidth.Size, MeasureSpecification.ModeType.Exactly);
foreach (LayoutItem childLayout in LayoutChildren)
{
- if (childLayout.Owner.ExcludeLayouting)
+ if (!childLayout.Owner.ExcludeLayouting)
{
continue;
}