CenterContainer
Centers children using their minimum sizes.
Normal mode centers each eligible child Control within the container size. Several children can overlap: this is neither a row/column nor automatic scaling.
UseTopLeft = true centers around local origin (0,0), rather than aligning the child’s top-left to zero. A 20×10 child is positioned at (-10,-5). Child-derived container minimum becomes zero in this mode; CustomMinimumSize can still impose a requirement. Usually leave false to center inside a panel.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CenterContainerConstructor
public CenterContainer();Creates a centering container; UseTopLeft defaults to false. Content is not scaled to fill it.
Properties1
UseTopLeftProperty
public bool UseTopLeft { get; set; }When true centers children around (0,0), usually with negative Position, and removes child-derived minimum. Does not align a child corner to zero. When false the center is the container midpoint.
Methods2
IsUsingTopLeftbool
public bool IsUsingTopLeft();When true centers children around (0,0), usually with negative Position, and removes child-derived minimum. Does not align a child corner to zero. When false the center is the container midpoint.
boolCurrent origin-centered mode; false by default.
SetUseTopLeftvoid
public void SetUseTopLeft(bool enable);When true centers children around (0,0), usually with negative Position, and removes child-derived minimum. Does not align a child corner to zero. When false the center is the container midpoint.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enabletrue centers around local origin, false within the container size.