reckfellENGINE

CenterContainer

Centers children using their minimum sizes.

On this page
class CenterContainerReckfellSharpInherits Container

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
# CenterContainer
C#
public CenterContainer();

Creates a centering container; UseTopLeft defaults to false. Content is not scaled to fill it.

Properties1

UseTopLeftProperty
# UseTopLeft
C#
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
# IsUsingTopLeft
C#
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.

Returns bool

Current origin-centered mode; false by default.

SetUseTopLeftvoid
# SetUseTopLeft
C#
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.

Parameters
NameTypeDefault
enablebool—
enable

true centers around local origin, false within the container size.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.