X Units

The X Units variable controls how a unit is horizontally positioned relative to its parent. By default an object is positioned relative to the left of its parent, where each unit represents 1 pixel.

PixelsFromLeft

The following shows a child ColoredRectangle positioned 50 PixelsFromLeft relative to its parent:

PixelsFromCenterX

The following shows a child ColoredRectangle positioned 50 PixelsFromCenterX relative to its parent:

PixelsFromRight

The following shows a child ColoredRectangle positioned 50 PixelsFromRight relative to its Parent:

PercentageWidth

The following shows a child ColoredRectangle positioned 50 PercentageWidth relative to its Parent. In other words, it will be positioned halfway between the left and right edges of the Parent:

Last updated