Control child = controls[i];
Size child_size = child.Size;
-#if NET_2_0
if (child.AutoSize)
child_size = GetPreferredControlSize (child);
-#endif
if (!child.VisibleInternal
|| child.ControlLayoutType == Control.LayoutType.Anchor)
}
}
-#if NET_2_0
void LayoutAutoSizedChildren (Control parent, Control[] controls)
{
for (int i = 0; i < controls.Length; i++) {
container.SetBoundsInternal (left, top, width, height, BoundsSpecified.None);
}
-#endif
public override bool Layout (object container, LayoutEventArgs args)
{
LayoutDockedChildren (parent, controls);
LayoutAnchoredChildren (parent, controls);
-#if NET_2_0
LayoutAutoSizedChildren (parent, controls);
if (parent is Form) LayoutAutoSizeContainer (parent);
-#endif
return false;
}
-#if NET_2_0
private Size GetPreferredControlSize (Control child)
{
int width;
return new Size (width, height);
}
-#endif
}
}