List

Inherits from UIView

Used by: ComboBox DataGrid TabPanel

Description

The list view presents a selectable list of items. It can either contain a static list of ListItem views or one ListItem with IsTemplate="True". If bound to list data through the Items field the list uses the template to generate a dynamic list of ListItems.

View Fields

NameTypeDescription
AddMaskMargin ListIndicates if mask margin should be added.
Boolean indicating if margin should be added to the content mask to make room for the scrollbars.
AlignmentElementAlignmentView alignment.
Used to align the view relative to the layout parent region it resides in.

Enum Values
NameDescription
CenterElement centered horizontally and vertically.
LeftElement aligned to the left horizontally and centered vertically.
TopElement aligned to the top vertically and centered horizontally.
RightElement aligned to the right horizontally and centered vertically.
BottomElement aligned to the bottom vertically and centered horizontally.
TopLeftElement aligned to the top vertically and to the left horizontally.
TopRightElement aligned to the top vertically and to the right horizontally.
BottomLeftElement aligned to the bottom vertically and to the left horizontally.
BottomRightAlement aligned to the bottom vertically and to the right horizontally.
AlphafloatAlpha value.
Can be used to adjust the alpha color of this view and all its children. E.g. used for fade in/out animations. Is separate from and different from the background color of the view as it affects the children as well.
AlternateItemsboolIndicates if the items should alternate in style.
Boolean indicating if the ListItem style should alternate between "Default" and "Alternate".
BackgroundColor Color Background color of the view.
Background color of the view.
BackgroundImageSpriteAssetBackground image sprite.
The sprite that will be rendered.
BackgroundImageEventAlphaThreshold floatAlpha threshold for letting through events.
The alpha threshold specifying the minimum alpha a pixel must have for the event to be passed through.
BackgroundImageFillAmount floatBackground image fill amount.
Amount of the Image shown when the Image.type is set to Image.Type.Filled.
BackgroundImageFillCenter boolIndicates if center should be filled.
Boolean indicating whether or not to render the center of a Tiled or Sliced image.
BackgroundImageFillClockwise boolIndicates if the image should be filled clockwise.
Whether the Image should be filled clockwise (true) or counter-clockwise (false).
BackgroundImageFillMethod FillMethod Background image fill method.
Indicates what type of fill method should be used.

Enum Values
NameDescription
Horizontal
Vertical
Radial90
Radial180
Radial360
BackgroundImageFillOrigin intBackground image fill origin.
Controls the origin point of the Fill process. Value means different things with each fill method.
BackgroundImageMaskable boolIndicates if the image is maskable.
Indicates if the background image graphic is to be maskable.
BackgroundImageOverrideSpriteSpriteAssetBackground image override sprite.
Set an override sprite to be used for rendering. If set the override sprite is used instead of the regular image sprite.
BackgroundImagePreserveAspect boolPreserve aspect ratio.
Indicates whether this image should preserve its Sprite aspect ratio.
BackgroundImageType Type Type of background image.
The type of the image sprite that is to be rendered.

Enum Values
NameDescription
Simple
Sliced
Tiled
Filled
BackgroundMaterial Material Background image material.
Background image material.
BaseDirectorystringBase directory.
Specifies the base directory to be used by the view and its children. The base directory is used when loading resources such as sprites, fonts, etc.
BasedOnstringBased on style.
Used in style definition to specify which style it's based on.
CanDeselectboolIndicates if items can be deselected by clicking.
A boolean indicating if items in the list can be deselected by clicking. Items can always be deselected programmatically.
CanMultiSelectboolIndicates if more than one list item can be selected.
A boolean indicating if more than one list items can be selected by clicking or programmatically.
CanReselectboolIndicates if item can be selected again if it's already selected.
Boolean indicating if the item can be selected again if it is already selected. This setting is ignored if CanDeselect is True.
CanScrollHorizontally ListIndicates if the content can scroll horizontally.
Boolean indicating if the content can be scrolled horizontally.
CanScrollVertically ListIndicates if the content can scroll vertically.
Boolean indicating if the content can be scrolled vertically.
CanSelectboolIndicates if items can be selected by clicking.
A boolean indicating if items can be selected by clicking. Items can always be selected programmatically.
ContentAlignmentElementAlignmentThe alignment of list items.
If the list items varies in size the content alignment specifies how the list items should be arranged in relation to each other.

Enum Values
NameDescription
CenterElement centered horizontally and vertically.
LeftElement aligned to the left horizontally and centered vertically.
TopElement aligned to the top vertically and centered horizontally.
RightElement aligned to the right horizontally and centered vertically.
BottomElement aligned to the bottom vertically and centered horizontally.
TopLeftElement aligned to the top vertically and to the left horizontally.
TopRightElement aligned to the top vertically and to the right horizontally.
BottomLeftElement aligned to the bottom vertically and to the left horizontally.
BottomRightAlement aligned to the bottom vertically and to the right horizontally.
ContentMargin ListContent margin of the list.
Sets the margin of the list mask view that contains the contents of the list.
DecelerationRate ListScroll deceleration rate.
Value indicating the rate of which the scroll stops moving.
DeselectAfterSelectboolIndicates if items are deselected immediately after being selected.
A boolean indicating if items are deselected immediately after being selected. Useful if you want to trigger selection action but don't want the item to remain selected.
DisableInteractionScrollDelta ListScroll delta distance for disabling interaction.
If set any interaction with child views (clicks, etc) is disabled when the specified distance has been scrolled. This is used e.g. to disable clicks while scrolling a selectable list of items.
DisableItemArrangementboolBoolean indicating if list item arrangement should be disabled.
If set to true the list doesn't automatically arrange one item after another. Used when item arrangement is done elsewhere.
Elasticity ListScroll elasticity.
Value indicating how elastic the scrolling is when moved beyond the bounds of the scrollable content.
HasInertia ListIndicates if scroll has intertia.
Boolean indicating if the scroll has inertia.
HeightElementSizeThe height of the view.
Specifies the height of the view either in pixels or percents.
HideFlags HideFlags Hide flags for the game object.
Bit mask that controls object destruction, saving and visibility in editor.

Enum Values
NameDescription
None
HideInHierarchy
HideInInspector
DontSaveInEditor
NotEditable
DontSaveInBuild
DontUnloadUnusedAsset
DontSave
HideAndDontSave
HorizontalNormalizedPosition ListHorizontal normalized position.
Value between 0-1 indicating the position of the scrollable content.
HorizontalScrollbarBreadth ListBreadth of the horizontal scrollbar.
Breadth of the horizontal scrollbar.
HorizontalScrollbarColor ListHorizontal scrollbar image color.
Horizontal scrollbar image color.
HorizontalScrollbarHandleColor ListHorizontal scrollbar handle image color.
Horizontal scrollbar handle image color.
HorizontalScrollbarHandleImage ListHorizontal scrollbar handle image.
Horizontal scrollbar handle image sprite.
HorizontalScrollbarHandleImageType ListHorizontal scrollbar handle image type.
Horizontal scrollbar handle image sprite type.
HorizontalScrollbarHandleMaterial ListHorizontal scrollbar handle image material.
Horizontal scrollbar handle image material.
HorizontalScrollbarHandleSize ListHandle size.
The size of the horizontal scrollbar handle where 1 means it fills the entire horizontal scrollbar.
HorizontalScrollbarImage ListHorizontal scrollbar image.
Horizontal scrollbar image sprite.
HorizontalScrollbarImageType ListHorizontal scrollbar image type.
Horizontal scrollbar image sprite type.
HorizontalScrollbarMaterial ListHorizontal scrollbar image material.
Horizontal scrollbar image material.
HorizontalScrollbarNumberOfSteps ListScroll steps.
The number of steps to use for the value. A value of 0 disables use of steps.
HorizontalScrollbarOrientation ListOrientation of the horizontal scrollbar.
Orientation of the horizontal scrollbar.
HorizontalScrollbarScrollDirection ListScrollbar scroll direction.
Scrollbar scroll direction.
HorizontalScrollbarSpacing ListSpace between scrollbar and scrollable content.
Space between scrollbar and scrollable content.
HorizontalScrollbarValue ListScrollbar value.
The current value of the horizontal scrollbar, between 0 and 1.
HorizontalScrollbarVisibility ListHorizontal scrollbar visibility of scrollable list content.
Horizontal scrollbar visibility of scrollable list content.
HorizontalSpacingElementSizeHorizontal spacing between list items.
The horizontal spacing between list items.
IdstringThe ID of the view.
Specifies a unique ID for the view. Used to map the view to reference fields on the parent view model. Provides a way to reference the view in data bindings. Is used as selectors in styles.
IsActiveboolIndicates if the view is enabled.
Activates/deactivates the view. If set to false in this or in any parent view, all components are disabled, attached renderers are turned off, etc. Any components attached will no longer have Update() called.
IsDestroyedboolIndicates if the view has been destroyed by GameObject.Destroy().
IsDynamicboolIndicates if the view has been created dynamically.
IsInitializedboolGets or sets bool indicating if the view has been initialized.
IsItemSelectedboolIndicates if an item is selected.
Set to true when a list item is selected.
IsScrollableboolIndicates if the list is scrollable.
Boolean indicating if the list is to be scrollable.
IsTemplateboolIndicates if this view is to be used as a template.
A template view is used to create dynamic instances of the view. Used by certain views such as the List and TabPanel.
IsVisibleboolIndicate if the view is visible.
Can be used to adjust the visiblity of the view. If set to false the view is made invisible but unlike when deactivating the view, invisible views are still is active and takes up space.
ItemobjectItem data.
Provides a mechanism to bind to dynamic list data. The item is set, e.g. by the List view on the child views it generates for its dynamic list data. The Item points to the list item data the view is associated with.
ItemsIObservableListUser-defined data list.
Can be bound to an generic ObservableList to dynamically generate ListItems based on a template.
LayoutRootUserInterfaceGets layout root canvas.
ListMaskAlignment ListList mask alignment.
Specifies the alignment of the list mask.
ListMaskColor ListList max image color.
The color of the list max image.
ListMaskHeight ListThe height of the list mask image.
Specifies the height of the list mask image either in pixels or percents.
ListMaskImage ListList max image sprite.
The sprite that will be rendered as the list max.
ListMaskImageType ListList max image type.
The type of the image sprite that is to be rendered as the list max.
ListMaskMaterial ListList max image material.
The material of the list max image.
ListMaskOffset ListThe offset of the list mask image.
Specifies the offset of the list mask image.
ListMaskShowGraphic ListIndicates if list mask should be rendered.
Indicates if the list mask, i.e. the list mask background image sprite and color should be rendered.
ListMaskWidth ListThe width of the list mask image.
Specifies the width of the list mask image either in pixels or percents.
MarginElementMarginView margin
Determines the size of the content region relative the view's width and height. Adding margins to a view does not change its width or height.
MaxPoolSizeintMax list item pool size.
Indicates maximum number of list items that should be pooled. If not set it uses initial PoolSize is used as max. Pooled items are already created and ready to be used rather than being created and destroyed on demand. Can be used to increase the performance of dynamic lists.
MovementType ListBehavior when scrolled beyond bounds.
Enum specifying the behavior to use when the content moves beyond the scroll rect.
NormalizedPosition ListNormalized position of the scroll.
The scroll position as a Vector2 between (0,0) and (1,1) with (0,0) being the lower left corner.
OffsetElementMarginView offset.
Determines the offset of the content region relative to the view's position.
OffsetFromParentElementMarginView offset from parent.
Used by parent views to adjust the positioning of its children without affecting the internal offset of the children.
OrientationElementOrientationOrientation of the list.
Defines how the list items should be arranged.

Enum Values
NameDescription
VerticalVertical element orientation.
HorizontalHorizontal element orientation.
OverflowOverflowModeIndicates how items overflow.
Enum indicating how items should overflow as they reach the boundaries of the list.

Enum Values
NameDescription
OverflowItems can exceed the boundaries.
WrapItems will wrap as they reach the boundaries.
OverrideHeightElementSizeOverride height.
Used to override the layouting logic of inherited views and set the specified height.
OverrideWidthElementSizeOverride width.
Used to override the layouting logic of inherited views and set the specified width.
PaddingElementMarginList item padding.
Adds padding to the list.
Pivot Vector2 View pivot position.
The normalized position that the view rect transform rotates around.
PoolSizeintList item pool size.
Indicates how many list items should be pooled. Pooled items are already created and ready to be used rather than being created and destroyed on demand. Can be used to increase the performance of dynamic lists.
Position Vector3 Position of the view.
The local position of the view in relation to the layout parent view transform.
PropagateChildLayoutChangesboolIndicates if the view propagates child layout changes.
Boolean indicating if view propagates child layout changes. Generally set to true whenever a view adjusts its size to child layout changes.
RaycastBlockModeRaycastBlockModeIndicates when raycast should be blocked.
Enum indicating when raycasts should be blocked by the view.

Enum Values
NameDescription
DefaultRaycast is blocked if view is displayed and not transparent.
AlwaysRaycast is always blocked.
NeverRaycast is never blocked.
RealizationMarginfloatIndicates how much margin should be added to the realization viewport.
Boolean indicating how much margin should be added to the realization viewport. If zero the realization viewport will be the same size as the scrollable viewport. Used when UseVirtualization is True.
Rotation Quaternion Rotation of the view.
The local rotation of the view in relation to the layout parent view transform. Stored as a Quaternion but specified in XUML as euler angles.
Scale Vector3 Scale of the view.
The scale of the view in relation to the layout parent view transform.
ScrollableContentAlignment ListAlignment of scrollable list content.
Sets the alignment of the scrollable list content.
ScrollSensitivity ListScroll sensitivity.
Value indicating how sensitive the scrolling is to scroll wheel and track pad movement.
ScrollVelocity ListCurrent velocity of the content.
Indicates the current velocity of the scrolled content.
SelectedItemobjectSelected data list item.
Set when the selected list item changes and points to the user-defined data item.
SelectedItemsGenericObservableListSelected items in the data list.
Contains selected items in the user-defined list data. Can contain more than one item if IsMultiSelect is true.
SelectOnMouseUpboolIndicates if items are selected on mouse up.
Boolean indicating if items are selected on mouse up rather than mouse down (default).
ShowTemplateInEditorboolIndicates if template is to be shown in the editor.
Boolean indicating if template should be shown in the editor.
SortDirectionElementSortDirectionSort direction.
If list items has SortIndex set they can be sorted in the direction specified.

Enum Values
NameDescription
AscendingAscending element sort direction.
DescendingDescending element sort direction.
SortIndexintView sort index.
The sort index is used by views such as Group and List to sort its child views.
SpacingElementSizeSpacing between list items.
The spacing between list items.
StatestringView state.
View state name. Determines state values to be applied to the view. All views start out in the "Default" state and when the state changes the values associated with that state are applied to the view.
StylestringThe style of the view.
Used as selector by the styles. Specifies the name of the style that is to be applied to the view and any children that explicitly inherits its style. The style is applied when the view is created (usually in the editor as the XUML is processed).
ThemestringThe theme of the view.
Specifies the name of the theme that is applied to the view and its children. The theme determines which set of styles are to be considered when applying matching styles to the view.
UnitSizeVector3 Unit size.
Specifies the user-defined unit size to be used by the view and its children. Used when element size is specified in user-defined units to convert it into pixels.
UpdateBackgroundboolIndicates if background is updated.
If set to false the background image and color is not updated by the view. Is used when the background updates is done elsewhere.
UpdateRectTransformboolIndicates if rect transform is updated.
If set to false the rect transform is not updated by the layout logic. It is used when layouting is done elsewhere.
UseListMaskboolIndicates if a list mask is to be used.
Boolean indicating if a list mask is to be used.
UseVirtualizationboolIndicates if list should use virtualization.
Boolean indicating if list should use virtualization where only visible list items are presented in the visual hierarchy.
VerticalNormalizedPosition ListVertical normalized position.
Value between 0-1 indicating the position of the scrollable content.
VerticalScrollbarBreadth ListBreadth of the vertical scrollbar.
Breadth of the vertical scrollbar.
VerticalScrollbarColor ListVertical scrollbar image color.
Vertical scrollbar image color.
VerticalScrollbarHandleColor ListVertical scrollbar handle image color.
Vertical scrollbar handle image color.
VerticalScrollbarHandleImage ListVertical scrollbar handle image.
Vertical scrollbar handle image sprite.
VerticalScrollbarHandleImageType ListVertical scrollbar handle image type.
Vertical scrollbar handle image sprite type.
VerticalScrollbarHandleMaterial ListVertical scrollbar handle image material.
Vertical scrollbar handle image material.
VerticalScrollbarHandleSize ListVertical scrollbar handle size.
The size of the vertical scrollbar handle where 1 means it fills the entire vertical scrollbar.
VerticalScrollbarImage ListVertical scrollbar image.
Vertical scrollbar image sprite.
VerticalScrollbarImageType ListVertical scrollbar image type.
Vertical scrollbar image sprite type.
VerticalScrollbarMaterial ListVertical scrollbar image material.
Vertical scrollbar image material.
VerticalScrollbarNumberOfSteps ListScroll steps.
The number of steps to use for the value. A value of 0 disables use of steps.
VerticalScrollbarOrientation ListOrientation of the vertical scrollbar.
Orientation of the vertical scrollbar.
VerticalScrollbarScrollDirection ListScrollbar scroll direction.
Scrollbar scroll direction.
VerticalScrollbarSpacing ListSpace between scrollbar and scrollable content.
Space between scrollbar and scrollable content.
VerticalScrollbarValue ListScrollbar value.
The current value of the vertical scrollbar, between 0 and 1.
VerticalScrollbarVisibility ListVertical scrollbar visibility of scrollable list content.
Vertical scrollbar visibility of scrollable list content.
VerticalSpacingElementSizeVertical spacing between list items.
The vertical spacing between list items.
VirtualizationUpdateThresholdfloatIndicates how many pixels should be scrolled before virtualization updates.
Boolean indicating how many pixels should be scrolled before virtualization updates.
WidthElementSizeThe width of the view.
Specifies the width of the view either in pixels or percents.

View Actions

NameAction DataDescription
ItemSelectedItemSelectionActionDataItem selected view action.
Triggered when a list item is selected either by user interaction or programmatically.
ItemDeselectedItemSelectionActionDataItem deselected view action.
Triggered when a list item is deselected either by user interaction or programmatically. An item is deselected if another item is selected and CanMultiSelect is false. If CanMultiSelect is true an item is deselected when the user clicks on an selected item.
ListChangedListChangedActionDataList changed view action.
Triggered when the list changes (items added, removed or moved).
CancelnoneCancel view action.
Triggered by the EventSystem when a cancel event occurs.
DeselectnoneDeselect view action.
Triggered by the EventSystem when another view is selected.
DropnoneDrop view action.
Triggered by the EventSystem when the view accepts a drop.
MovenoneMove view action.
Triggered by the EventSystem when a move event occurs.
ClicknoneClick view action.
Triggered by the EventSystem when the user clicks/touches on the view.
BeginDragnoneDrag view action.
Triggered by the EventSystem when the user presses mouse on and starts to drag over the view.
EndDragnoneEnd drag view action.
Triggered by the EventSystem when the user stops dragging mouse over the view.
DragnoneDrag view action.
Triggered by the EventSystem as the user drags the mouse over the view.
InitializePotentialDragnoneInitialize potential drag view action.
Triggered by the EventSystem as the user initiates a potential drag over the view.
MouseDownnoneMouse down view action.
Triggered by the EventSystem when the mouse/touch presses down over the view.
MouseEnternoneMouse enter view action.
Triggered by the EventSystem when the mouse enters the view.
MouseExitnoneMouse exit view action.
Triggered by the EventSystem when the mouse exits the view.
MouseUpnoneMouse up view action.
Triggered by the EventSystem when the mouse/thouch releases over the view.
ScrollnoneScroll view action.
Triggered by the EventSystem when the user scrolls when the view is selected.
SelectnoneSelect view action.
Triggered by the EventSystem when the view is selected.
SubmitnoneSubmit view action.
Triggered by the EventSystem when the user submits while view is selected.
UpdateSelectednoneUpdate selected view action.
Triggered by the EventSystem when the object associated with this EventTrigger is updated.
ActivatednoneActivated view action.
Triggered every time the view is activated. Also triggered once the view is intialized if it starts out activated.
DeactivatednoneDeactivated view action.
Triggered every time the view is deactivated. Also triggered once the view is intialized if it starts out deactivated.





















Join the Announcement List

Be notified when new themes, views, tutorials and updates are available