Skip to content

SizeFlags

Eduard Gushchin edited this page Jul 1, 2026 · 3 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.SizeFlags
Namespace Electron2D
Kind enum
Category UI and Text

Overview

Describes how a Electron2D.Control uses space allocated by a parent Electron2D.Container.

Syntax

public enum Electron2D.SizeFlags : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: Control.SizeFlags

Layout flags used by containers for shrink, fill, expand, expand-fill and centered/end placement.

Remarks

The expansion and fill values can be combined. Containers use them to decide whether a child fills its allocated slot, receives extra space, or stays near a particular side of that slot.

Since

This enum is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Control.SizeFlagsHorizontal
  • Electron2D.Control.SizeFlagsVertical

Members

Member Kind Summary
Expand Enum value The control receives a share of extra space on the relevant axis.
ExpandFill Enum value The control expands and fills the allocated slot on the relevant axis.
Fill Enum value The control fills the allocated slot on the relevant axis.
ShrinkBegin Enum value The control keeps its minimum size and is placed at the beginning of the allocated slot.
ShrinkCenter Enum value The control keeps its minimum size and is centered inside the allocated slot.
ShrinkEnd Enum value The control keeps its minimum size and is placed at the end of the allocated slot.

Member Details

Expand

Kind: Enum value

public const Electron2D.SizeFlags Expand

Summary

The control receives a share of extra space on the relevant axis.

Remarks

The share is weighted by Electron2D.Control.SizeFlagsStretchRatio. This flag does not imply that the child fills its final slot.

Since

This enum value is available since Electron2D 0.1.0 Preview.

ExpandFill

Kind: Enum value

public const Electron2D.SizeFlags ExpandFill

Summary

The control expands and fills the allocated slot on the relevant axis.

Remarks

This value is equivalent to combining Electron2D.SizeFlags.Expand with Electron2D.SizeFlags.Fill.

Since

This enum value is available since Electron2D 0.1.0 Preview.

Fill

Kind: Enum value

public const Electron2D.SizeFlags Fill

Summary

The control fills the allocated slot on the relevant axis.

Remarks

Use this value when a child should stretch to the full slot size after the parent container has decided the slot rectangle.

Since

This enum value is available since Electron2D 0.1.0 Preview.

ShrinkBegin

Kind: Enum value

public const Electron2D.SizeFlags ShrinkBegin

Summary

The control keeps its minimum size and is placed at the beginning of the allocated slot.

Remarks

This is the neutral shrink value for the relevant axis.

Since

This enum value is available since Electron2D 0.1.0 Preview.

ShrinkCenter

Kind: Enum value

public const Electron2D.SizeFlags ShrinkCenter

Summary

The control keeps its minimum size and is centered inside the allocated slot.

Remarks

This flag is considered only when the child is not filling the slot on the relevant axis.

Since

This enum value is available since Electron2D 0.1.0 Preview.

ShrinkEnd

Kind: Enum value

public const Electron2D.SizeFlags ShrinkEnd

Summary

The control keeps its minimum size and is placed at the end of the allocated slot.

Remarks

This flag is considered only when the child is not filling the slot on the relevant axis.

Since

This enum value is available since Electron2D 0.1.0 Preview.

Clone this wiki locally