Skip to main content

Property Types

AlignmentBoundary

A value that is used to constrain the result of aligning an element.

ValueDescription
NoneThe element has no boundary and no clamping will occur
ScreenThe element's position is clamped to the screen. This ensures the element remains on screen
ParentThe element's position is clamped inside the bounds of it's parent
ParentContentAreaThe element's position is clamped to the it's parent size minus any padding or border the parent has on the relaveant axis
ClipperThe element's position is clamped to the it's clipper's bounds
ViewThe element's position is clamped to the it's view's bounds
UnconstrainedParentThe element's position is clamped to the it's parent's bounds but ignores the element's size, effectively ensuring the alignment point remains inside the parent but the rest of the element is unconstrained

syntax

AlignmentDirection

Determines the direction that alignment will occur.

ValueDescription
StartThe element aligns from the left side of the parent
EndThe element aligns from the right side of the parent

syntax

AlignmentOffset

Offsets the point from which alignment occurs

UnitShorthandDescription
WidthwThe width of the element
HeighthThe height of the element
ContentHeightcnthThe content height of the element
ContentWidthcntwThe content width of the element
EmemThe em size resolved for this element
ParentWidthpwThe post layout width of the parent element or the view size if parent is null
ParentHeightphThe post layout height of the parent element or the view size if parent is null
ParentContentAreaWidthpcawThe parent's width (or viewport width if parent is null) minus any border and padding on the horizontal axis
ParentContentAreaHeightpcahThe parent's height (or viewport height if parent is null) minus any border and padding on the vertical axis
ContentAreaWidthcawThe post layout width of the element minus any padding and border on the horizontal axis
ContentAreaHeightcahThe post layout height of the element minus any padding and border on the vertical axis
Percent%A percentage based value, the value that this is relative to changes based on the property usage. See individual properties to see what the % relative value is
PixelpxA fixed pixel value that accounts for any dpi scaling
ScreenWidthswThe total screen width in dpi scaled pixels
ScreenHeightshThe total screen height in dpi scaled pixels
ViewportWidthvwThe width of the view that an element belongs to in dpi scaled pixels
ViewportHeightvhThe height of the view that an element belongs to in dpi scaled pixels
BackgroundImageWidthbwThe width of the currently assigned background texture in unscaled texels
BackgroundImageHeightbhThe height of the currently assigned background texture in unscaled texels

syntax

AlignmentTarget

Determines the point against which an element applies alignments.

ValueDescription
LayoutBoxThe element aligns relative to it's own layout position and size
ClipperThe element aligns relative to it's clippers position and size or it's view if there is no clipper
ParentThe element aligns relative to it's parent position and size
ParentContentAreaThe element aligns relative to it's parent position and size inset by any padding and border the parent has on the relavant axis
ViewThe element aligns relative to it's view
ScreenThe element aligns relative to the screen
MouseThe element aligns relative to the mouse position. This is an easy way to make things follow the mouse

syntax

AspectRatio

Constrains the element's size based on a provided aspect ratio.

There are two valid values WidthControlsHeight and HeightControlsWidth

These modes in conjuction with a ratio define the size constraints for this element during layout.

There are some layout types that cannot support this in some cases, most notably HorizontalWrap and VerticalWrap cannot support element's aspect ratio constraints on the main axis.

Style syntax examples:

height-ctrl-width 1:1 width-ctrl-height 3:2 height-ctrl-width 5:1

syntax

BackgroundFit

Determines how an element's background texture will scale with the element's rendered size.

ValueDescription
ScaleToFitThe image will scale up or down with element size but will retain it's native aspect ratio
ScaleToFitAndOverflowThe image will scale up or down with element size but will retain it's native aspect ratio, allows the texture to overflow the element size
FillThe image will always fill the entire element and will not retain its native aspect ratio

syntax

BorderMode

Currently Unused

syntax

ClipBehavior

Determines what kind of rectangles can clip this element.

ValueDescription
NormalThe element is clipped against the next highest element in it's ancestry with an OverflowX or OverflowY property defined
NeverThe element will never be clipped
ViewThe element will clip only against it's view
ScreenThe element will clip only against the screen

syntax

ClipBounds

Determines the rectangle considered for clipping children when OverflowX or OverflowY are set for an element

ValueDescription
BorderBoxThe clipping size is determined based on the full size of the element
ContentBoxThe clipping size is determined based on the full size of the element and inset by any padding or border on the clipping element

syntax

CursorInfo

A reference to a cursor asset

syntax

ElementRelativeSize

A size that is relative to an element's post layout size.

% is relative to the element's height or width depending on which axis this property is applied to.

UnitShorthandDescription
WidthwThe width of the element
HeighthThe height of the element
Percent%A percentage based value, the value that this is relative to changes based on the property usage. See individual properties to see what the % relative value is
PixelpxA fixed pixel value that accounts for any dpi scaling
BackgroundImageWidthbwThe width of the currently assigned background texture in unscaled texels
BackgroundImageHeightbhThe height of the currently assigned background texture in unscaled texels
MinWidthHeightmnwhThe minimum of the target's width or height
MaxWidthHeightmxwhThe maximum of the target's width or height

syntax

FontAssetId

A reference to a Font asset

syntax

FontStyle

Not yet implemented

ValueDescription
NormalThe text will render normally without decoration
BoldThe text will render with a bold font if available or a pseudo bold if no bold font is provided
ItalicThe text will render with an italic font if available or a pseudo italic if no italic font is provided
UnderlineThe text will render with an underline
StrikeThroughThe text will render with a strike though

Multiple values can applied with an | operator. For example to render both bold and italic: Bold | Italic

syntax

GridItemPlacement

Defines how an element is placed inside of a grid layout. Only applies if the element's layout parent is a grid

This is made of two parts, a place and a span. place refers to the coordinate on the relevant axis that the element should placed on. If place < 0 the grid will automatically place the element in the next available cell(s).

span tells the grid how wide or tall the element should be inside the grid. If span <= 0 it will default to 1

syntax

GridLayoutDensity

Grids can either be Dense or Sparse. When a grid places element inside of itself, Dense will always try to place new elements starting at the first cell where Sparse will remember the last place it successfully placed and element and will continue placement from that point. Sparse is faster since the search range is reduced.

syntax

GridTemplate

Grids define a template of cells that determine how elements are sized and placed within it.

A grid can define a maximum of 24 cells on each axis

syntax

ImageRenderMode

Not yet implemented

syntax

LayoutBehavior

An element can either participate in it's parent's layout phase (Normal) or not (Ignored). An element with LayoutBehavior = Ignored will be totally ignored by it's parent and will not contribute to it's parent size at all. Ignored elements are always laid out at their parent's top left position. Ignored elements can reference sizes relative to their parent and excute their layout after the parent has completed it's main layout pass.

syntax

LayoutDirection

Layout direction determines if an element lays out it's children starting with the first child and ending with the last child (Forward) or starting with the last child and ending with the first (Reverse)

syntax

LayoutType

Determines the layout algorithm used by an element to layout it's children that are do not have LayoutBehavior = Ignored

ValueDescription
VerticalA one dimensional vertical column
HorizontalA one dimensional horizontal colum
GridHorizontalA two dimensional grid that places children first horizontally then wraps to another row when overflowing
GridVerticalA two dimensional grid that places children first vertically then wraps to another column when overflowing
HorizontalWrapSimilar to Horizontal except that children that overflow will wrap to a new row instead of simply overflowing
VerticalWrapSimilar to Vertical except that children that overflow will wrap to a new column instead of simply overflowing
StackAll children are laid out on top of each other on the z axis
RadialNot yet implemented

syntax

Overflow

Determines if any descendants that overflow are Visible or Hidden. Note that this only applies to screen aligned bounding boxes and is not the same as per-pixel masking.

syntax

PointerEvents

Determine if input should be handled by an element or completely ignored

ValueDescription
NormalInput is handled as normal
NoneInput is totally ignored

syntax

RenderTransform

Applies a series of matrix transformations to an element in world space. Supports up to 7 transformations.

syntax

RevealDirection

The direction in which a reveal effect runs, either Clockwise or CounterClockWise

syntax

RevealMode

ValueDescription
NoneNo reveal effect
ManualUser completely controls the effect with the corresponding style properties
HorizontalSweepLeftReveal the element from right to left
HorizontalSweepRightReveal the element from left to right
VerticalSweepUpReveal the element from bottom to top
VerticalSweepDownReveal the element from top to bottom
RadialSweepReveal the element from the center point in a sweep direction set by RevealDirection
CenterExpandReveal the element from the center in an ever growing circle, size is set by RevealAmount
OffsetExpandReveal the element from the RevealOffsetX and RevealOffsetY positions in an ever growing circle, size is set by RevealAmount

syntax

SpaceCollapse

Determines the interaction of padding and margin between elements in a layout.

Multiple values can be set with the | operator

ValueDescription
NoneNo changes occur, both parent and siblings all keep their defined paddings and margins
RemoveInnerRemoves all marigins from children except left margin on the first child and right margin on the last
RemoveOuterRemoves margin left from the first child and margin right from the last child
CollapseOuterLooks at the parent's padding left and the first child's margin left and takes the larger of the two. Does the opposite for the last child
CollapseInnerLooks at the margins between each child and takes the largest of the two
CollapseApplies both CollapseInner and CollapseOuter
RemoveApplies both RemoveInner and RemoveOuter

syntax

TextAlignment

Aligns the text within its own layout box. Does not impact text position if text is content sized because in that case there is no space to align into.

ValueDescription
LeftPush text to the left
RightPush text to the right
CenterCenter the text

syntax

TextAlignmentVertical

Aligns the text vertically within its own layout box. Does not impact text position if text is content sized because in that case there is no space to align into.

Not currently working

ValueDescription
BaselineAligns text to the elements baseline
TopAligns text to geometric top of the text quads
BottomAligns text to geometric bottom of the text quads
CenterAligns text to geometric center of the text quads

syntax

TextOverflow

Determine how text is displayed that overflows its own bounds

Not currently working

ValueDescription
NoneDo nothing and allow the overflow
TruncateShorten the rendered text so there is no overflow
EllipsisShorten the rendered text so there is no overflow and append ...

syntax

TextTransform

Performs a case transform on text

ValueDescription
NoneInput is unchanged
UpperCaseAll characters in the text will be uppercased
LowerCaseAll characters in the text will be lowercased
SmallCapsAll characters in the text will be uppercased but rendered smaller. Not currently working
TitleCaseThe first character of each word in the text will be upper cased. Not currently working

syntax

TextureInfo

A reference to a texture, gradient, or mask. Includes a SampleMode that defines how the texture will be used

ValueDescription
DefaultJust renders the texture as is
NineSliceApplies 9-slice borders based on the element's Border sizes and the texture asset's Border size
LinearGradientSamples the texture a linear gradient. Underlying texture data should be a gradient or this will look very strange
RadialGradientSamples the texture a radial gradient. Underlying texture data should be a gradient or this will look very strange
EllipticalGradientSamples the texture an elliptical gradient gradient. Underlying texture data should be a gradient or this will look very strange
ConicGradientSamples the texture a conic gradient. Underlying texture data should be a gradient or this will look very strange
SoftMaskSamples the texture as a soft mask, applying its alpha value along with a threshold to determine which parts of the main texture are visible
SoftMaskInverseSame as SoftMask but inverts the mask region
HardMaskInverseSame as HardMask but inverts the mask region

syntax

TextureRelativeSize

A size that is relative to a given texture's size.

% is relative to the texture's height or width depending on which axis this property is applied to.

UnitShorthandDescription
Percent%A percentage based value, the value that this is relative to changes based on the property usage. See individual properties to see what the % relative value is
PixelpxA fixed pixel value that accounts for any dpi scaling
ImageWidthbwThe width of the currently assigned background texture in unscaled texels
ImageHeightbhThe height of the currently assigned background texture in unscaled texels

syntax

UIAngle

An angular measurement

% is relative to a rotation of 360 degrees. 25% == 90 degrees, 50% == 180 degrees, etc

UnitShorthandDescription
Percent%A percentage based value, the value that this is relative to changes based on the property usage. See individual properties to see what the % relative value is
DegreesdegAn angular value in degrees
RadiansradAn angular value in radians

syntax

UIFontSize

UnitShorthandDescription
EmemThe em size resolved for this element
RemremThe root em size resolved for this element
PointptA size specified in units defined by the currently assigned font file or the default font if none is assigned
PixelpxA fixed pixel value that accounts for any dpi scaling

syntax

UIMeasurement

A size used for measuring elements for layout.

% is relative to the parent's layout size.

There is a paradox that is possible where a parent has a size relative to its content and a child size's relative to its parent. In such cases the child will have a 0 size.

UnitShorthandDescription
ContentcntThe content size of the element
EmemThe em size resolved for this element
LineHeightlhThe line height of the element computed from the current font size
ParentSizepszThe size of the parent. Note that if there exists a paradox where the parent sizes itself based on content size and some child sizes itself based on the parent size. In this case the child will set its size to zero. This paradox is only applicable for layout
Percent%A percentage based value, the value that this is relative to changes based on the property usage. See individual properties to see what the % relative value is
PixelpxA fixed pixel value that accounts for any dpi scaling
ViewportWidthvwThe width of the view that an element belongs to in dpi scaled pixels
ViewportHeightvhThe height of the view that an element belongs to in dpi scaled pixels
BackgroundImageWidthbwThe width of the currently assigned background texture in unscaled texels
BackgroundImageHeightbhThe height of the currently assigned background texture in unscaled texels
StretchsA portion of 'remaining space' that should be attributed to this element.
ApplicationWidthawThe total width of the root view in dpi scaled pixels
ApplicationHeightahThe total width of the root view in dpi scaled pixels
MaxChildmxThe size of the largest child
MinChildmnThe size of the smallest child
StretchContentstrcntA unit that reserves at least 1x the content size and then adds n stretch pieces
FitContentfcNot Supported
FillRemainingfrA fixed percentage of the remaining space in a layout before stretch values are distributed

syntax

UIRange01

A range between 0 and 1 also expressable and a percentage

syntax

UISizeConstraint

A size that is used to constrain the min and max size of an element for layout.

% is relative to the parent's layout size.

UnitShorthandDescription
ContentcntThe content size of the element
EmemThe em size resolved for this element
LineHeightlhThe line height of the element computed from the current font size
ParentSizepszThe size of the parent. Note that if there exists a paradox where the parent sizes itself based on content size and some child sizes itself based on the parent size. In this case the child will set its size to zero. This paradox is only applicable for layout
Percent%A percentage based value, the value that this is relative to changes based on the property usage. See individual properties to see what the % relative value is
PixelpxA fixed pixel value that accounts for any dpi scaling
ViewportWidthvwThe width of the view that an element belongs to in dpi scaled pixels
ViewportHeightvhThe height of the view that an element belongs to in dpi scaled pixels
BackgroundImageWidthbwThe width of the currently assigned background texture in unscaled texels
BackgroundImageHeightbhThe height of the currently assigned background texture in unscaled texels
ApplicationWidthawThe total width of the root view in dpi scaled pixels
ApplicationHeightahThe total width of the root view in dpi scaled pixels
MaxChildmxThe size of the largest child
MinChildmnThe size of the smallest child

syntax

UISpaceSize

A size that is used to determine spacings around and between elements.

UnitShorthandDescription
EmemThe em size resolved for this element
PixelpxA fixed pixel value that accounts for any dpi scaling
ViewportWidthvwThe width of the view that an element belongs to in dpi scaled pixels
ViewportHeightvhThe height of the view that an element belongs to in dpi scaled pixels
StretchsA portion of 'remaining space' that should be attributed to this element.
ApplicationWidthawThe total width of the root view in dpi scaled pixels
ApplicationHeightahThe total width of the root view in dpi scaled pixels

syntax

UVWrapMode

Tells the graphics system how the uvs of a texture should be handled if they overflow.

ValueDescription
DefaultBehavior is determined based on the type of texture being sampled
WrapConstrain the uvs to the texture box and wrap them around if they overflow
ClampNever exceed the extreme edges of the uv box

syntax

Visibility

Determines the rendering visibility of an element. Does not impact layout or input handling or clipping.

ValueDescription
VisibleThe element is always rendered according to clipping rules as normal
HiddenThe element is not rendered

syntax

WhitespaceMode

Tells the text system how whitespace should be handled for a given piece of text.

Multiple values can be combined using the | operator

ValueDescription
NoneNo special processing
CollapseWhitespaceSubsequent whitespace characters are collapsed to be at most 1 character
PreserveNewLinesIf there are new line characters in the source, do not collapse them
TrimStartIf there is whitespace between text start and the first visible character, remove it
TrimEndIf there is whitespace between text end and the last visible character, remove it
TrimLineStartOn each line remove any leading whitespace
TrimLineEndOn each line remove any trailing whitespace
NoWrapDisable the auto wrapping feature
CollapseMultipleNewLinesSubsequent new lines get collapsed into a single new line
TrimLineApplies TrimLineStart and TrimLineEnd
TrimApplies TrimStart and TrimEnd
CollapseWhitespaceAndTrimApplies Trim and CollapseWhitespace

syntax