class in UnityEngine.Experimental.UIElements
/
继承自:Experimental.UIElements.VisualElement
切换到手册A vertically scrollable area that only creates visual elements for visible items while allowing the binding of many more items. As the user scrolls, visual elements are recycled and re-bound to new data items.
bindItem | Callback for binding a data item to the visual element. |
itemHeight | ListView requires all visual elements to have the same height so that it can calculate a sensible scroller size. This property must be set for the list view to function. |
itemsSource | The items data source. This property must be set for the list view to function. |
makeItem | Callback for constructing the VisualElement that will serve as the template for each recycled and re-bound element in the list. This property must be set for the list view to function. |
selectedIndex | Currently selected item index in the items source. If multiple items are selected, this will return the first selected item's index. |
selectedItem | The currently selected item from the items source. If multiple items are selected, this will return the first selected item. |
selectionType | Controls the selection state, whether: selections are disabled, there is only one selectable item, or if there are multiple selectable items. |
Refresh | Clear, recreate all visible visual elements, and rebind all items. This should be called whenever the items source changes. |
ScrollTo | Scroll to a specific visual element. |
ScrollToItem | Scroll so that a specific item index from the items source is visible. |
onItemChosen | Callback for when an item is chosen (double-click). This is different from just a selection. |
onSelectionChanged | Callback for a selection change. |
defaultFocusIndex | The default focus index for newly created elements. |
canGrabFocus | 如果元素可以获得焦点,则返回 true。 |
focusController | 返回此元素的焦点控制器。 |
focusIndex | 用于对焦点环中可获得焦点的元素排序的整数。负值表示元素不能获得焦点。 |
childCount | 此对象的 contentContainer 中的子元素数 |
clippingOptions | 是否应将此元素裁剪为绘制到其边界。 |
contentContainer | 子元素通常添加到此元素中 |
dataWatch | 对此元素 DataWatch 接口的访问。 |
enabledInHierarchy | 如果 VisualElement 是在它自己的层级视图中启用,则返回 true。 |
enabledSelf | 如果 VisualElement 是本地启用,则返回 true。 |
persistenceKey | 用于查看数据持久性(即树展开状态、滚动位置、缩放级别)。 |
schedule | 检索此 VisualElement 的 IVisualElementScheduler |
shadow | 访问此元素物理层级视图 |
style | 引用此元素的样式对象。 |
this[int] | 访问此元素物理层级视图 |
tooltip | Text to display inside an information box after the user hovers the element for a small amount of time. |
userData | 此属性可用于将特定于应用程序的用户数据与此 VisualElement 关联。 |
HandleEvent | 处理事件,通常是通过执行与事件关联的回调处理事件。 |
HasBubbleUpHandlers | Return true if event handlers for the event propagation BubbleUp phase have been attached on this object. |
HasTrickleDownHandlers | Returns true if event handlers, for the event propagation TrickleDown phase, are attached to this object. |
RegisterCallback | Adds an event handler to the instance. If the event handler has already been registered for the same phase (either TrickleDown or BubbleUp) then this method has no effect. |
SendEvent | Sends an event to the event handler. |
UnregisterCallback | 从此实例删除回调。 |
Blur | 通知元素释放焦点。 |
Focus | 尝试让此元素获得焦点。 |
Add | 向此元素的 contentContainer 添加一个元素 |
AddStyleSheetPath | 将此样式表文件添加到此元素的应用样式列表中 |
BringToFront | 将此元素放到其父子列表的末尾。此元素将显示在所有重叠的同级元素前方。 |
Children | 从元素的 contentContainer 返回元素 |
Clear | 从此元素的 contentContainer 中删除所有子元素 |
Contains | 如果元素是此 VisualElement 的直接子级,则返回 true |
ElementAt | 检索相应位置的子元素 |
EnableInClassList | Enables or disables the class with the given name. |
FindAncestorUserData | 向上搜索此 VisualElement 的层级视图并检索存储的 userData(如果找到)。 |
FindCommonAncestor | 查找 VisualTree 层级视图中两个 VisualElement 之间的最低共同上级 |
GetEnumerator | 允许循环访问此元素的子级 |
GetFirstAncestorOfType | 从此元素的父级开始向上访问层级视图,返回第一个此类型的 VisualElement |
GetFirstOfType | 从此元素开始向上访问层级视图,返回第一个此类型的 VisualElement |
GetFullHierarchicalPersistenceKey | 将此 VisualElement 与其父级的 VisualElement.persistenceKey 进行组合,从而创建更具唯一性的键以供 VisualElement.GetOrCreatePersistentData 使用。 |
GetOrCreatePersistentData | 引用现有的持久化对象和键,返回以保持的状态填充的对象或原样返回对象。 |
HasStyleSheetPath | 检查此样式表文件是否位于此元素的应用样式列表中 |
IndexOf | Retrieves the child index of the specified VisualElement. |
Insert | 向此元素的 contentContainer 插入一个元素 |
MarkDirtyRepaint | Triggers a repaint of the VisualElement on the next frame. |
OnPersistentDataReady | 当持久数据可访问和/或当数据或持久键发生更改时调用(VisualElement 有正确的父子关系)。 |
OverwriteFromPersistedData | 从持久性数据存储覆盖对象。 |
PlaceBehind | 将此元素放在其父子列表中同级元素之前紧邻的位置。如果此元素和同级元素位置重叠,此元素将显示在其同级元素之后。 |
PlaceInFront | 将此元素放在其父子列表中同级元素之后紧邻的位置。如果此元素和同级元素位置重叠,此元素将显示在其同级元素之前。 |
Remove | 从层级视图中删除此子级 |
RemoveAt | 从此元素的 contentContainer 中删除位于此位置的子元素 |
RemoveFromHierarchy | 将此元素从其父层级视图中删除 |
RemoveStyleSheetPath | 从此元素的应用样式列表中删除此样式表文件 |
SavePersistentData | 将持久性数据写入文件。 |
SendEvent | Sends an event to the event handler. |
SendToBack | 将此元素发送到其父子列表的开始处。此元素将显示在所有重叠的同级元素之后。 |
SetEnabled | Changes whether the current VisualElement is enabled or not. When disabled, a VisualElement does not receive most events. |
Sort | 重新排序来自此 VisualElement contentContainer 的子元素。 |
ToggleInClassList | Toggles between adding and removing the given class name from the class list. |
OnStyleResolved | 当对象样式发生更改时回调。 |