# VisualElement

> Base class for objects that are part of the UIElements visual tree.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Inherits from:** [Focusable](/engine/6000.0/script-reference/unityengine/uielements/focusable.md)
* **Implements:** [IEventHandler](/engine/6000.0/script-reference/unityengine/uielements/ieventhandler.md), [IResolvedStyle](/engine/6000.0/script-reference/unityengine/uielements/iresolvedstyle.md), [ITransform](/engine/6000.0/script-reference/unityengine/uielements/itransform.md), [ITransitionAnimations](/engine/6000.0/script-reference/unityengine/uielements/experimental/itransitionanimations.md), [IExperimentalFeatures](/engine/6000.0/script-reference/unityengine/uielements/iexperimentalfeatures.md), [IVisualElementScheduler](/engine/6000.0/script-reference/unityengine/uielements/ivisualelementscheduler.md)

```csharp
public class VisualElement : Focusable, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler
```

## Remarks

VisualElement contains several features that are common to all controls in UIElements, such as layout, styling and event handling. Several other classes derive from it to implement custom rendering and define behaviour for controls.

For more information, refer to [VisualElement](/engine/6000.0/manual/uitoolkits/uielements/uie-element-ref/uie-uxml-element-visual-element.md).

To inherit from VisualElement and create a custom control, refer to [Creating a custom control](/engine/6000.0/manual/uitoolkits/uielements/uie-structure-ui/uie-uxml-examples/uib-structuring-ui-custom-elements.md).

## Static Fields

| Value                                                                                                                | Description                                |
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| [disabledUssClassName](/engine/6000.0/script-reference/unityengine/uielements/visualelement/disabledussclassname.md) | USS class name of local disabled elements. |

## Constructors

| Constructor                                                                                     | Description                                           |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [VisualElement()](/engine/6000.0/script-reference/unityengine/uielements/visualelement/ctor.md) | Initializes and returns an instance of VisualElement. |

## Properties

| Property                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [childCount](/engine/6000.0/script-reference/unityengine/uielements/visualelement/childcount.md)                       | Number of child elements in this object's contentContainer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [contentContainer](/engine/6000.0/script-reference/unityengine/uielements/visualelement/contentcontainer.md)           | Child elements are added to it, usually this is the same as the element itself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [contentRect](/engine/6000.0/script-reference/unityengine/uielements/visualelement/contentrect.md)                     | The rectangle of the content area of the element, in the local space of the element. (Read Only)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [customStyle](/engine/6000.0/script-reference/unityengine/uielements/visualelement/customstyle.md)                     | The custom style properties accessor of a [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) (Read Only).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [dataSource](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasource.md)                       | Assigns a data source to this VisualElement which overrides any inherited data source. This data source is inherited by all children.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [dataSourcePath](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasourcepath.md)               | Path from the data source to the value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [dataSourceType](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasourcetype.md)               | The possible type of data source assignable to this VisualElement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [disablePlayModeTint](/engine/6000.0/script-reference/unityengine/uielements/visualelement/disableplaymodetint.md)     | Play-mode tint is applied by default unless this is set to true. It's applied hierarchically to this [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) and to all its children that exist on an editor panel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [enabledInHierarchy](/engine/6000.0/script-reference/unityengine/uielements/visualelement/enabledinhierarchy.md)       | Returns true if the [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) is enabled in its own hierarchy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [enabledSelf](/engine/6000.0/script-reference/unityengine/uielements/visualelement/enabledself.md)                     | Returns true if the [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) is enabled locally.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [experimental](/engine/6000.0/script-reference/unityengine/uielements/visualelement/experimental.md)                   | Returns the UIElements experimental interfaces.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [generateVisualContent](/engine/6000.0/script-reference/unityengine/uielements/visualelement/generatevisualcontent.md) | Delegate function to generate the visual content of a visual element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [hierarchy](/engine/6000.0/script-reference/unityengine/uielements/visualelement/hierarchy-1.md)                       | Access to this element physical hierarchy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [this\[\]](/engine/6000.0/script-reference/unityengine/uielements/visualelement/item.md)                               | Retrieves the child element at a specific index.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [languageDirection](/engine/6000.0/script-reference/unityengine/uielements/visualelement/languagedirection.md)         | Indicates the directionality of the element's text. The value will propagate to the element's children.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [layout](/engine/6000.0/script-reference/unityengine/uielements/visualelement/layout.md)                               | The position and size of the VisualElement relative to its parent, as computed by the layout system. (Read Only)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [localBound](/engine/6000.0/script-reference/unityengine/uielements/visualelement/localbound.md)                       | Returns a [Rect](/engine/6000.0/script-reference/unityengine/rect.md) representing the Axis-aligned Bounding Box (AABB) after applying the transform, but before applying the layout translation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [name](/engine/6000.0/script-reference/unityengine/uielements/visualelement/name.md)                                   | The name of this VisualElement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [paddingRect](/engine/6000.0/script-reference/unityengine/uielements/visualelement/paddingrect.md)                     | The rectangle of the padding area of the element, in the local space of the element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [panel](/engine/6000.0/script-reference/unityengine/uielements/visualelement/panel.md)                                 | The panel onto which this VisualElement is attached.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [parent](/engine/6000.0/script-reference/unityengine/uielements/visualelement/parent.md)                               | The parent of this VisualElement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [pickingMode](/engine/6000.0/script-reference/unityengine/uielements/visualelement/pickingmode.md)                     | Determines if this element can be pick during mouseEvents or [IPanel.Pick](/engine/6000.0/script-reference/unityengine/uielements/ipanel/pick.md) queries.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [resolvedStyle](/engine/6000.0/script-reference/unityengine/uielements/visualelement/resolvedstyle.md)                 | The final rendered style values of a visual element, as it's rendered in the current frame.(Read Only)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [scaledPixelsPerPoint](/engine/6000.0/script-reference/unityengine/uielements/visualelement/scaledpixelsperpoint.md)   | Return the resulting scaling from the panel that considers the screen DPI and the customizable scaling factor, but not the transform scale of the element and its ancestors. See scaledPixelsPerPoint. This should only be called on elements that are part of a panel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [schedule](/engine/6000.0/script-reference/unityengine/uielements/visualelement/schedule.md)                           | Retrieves this VisualElement's IVisualElementScheduler                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [style](/engine/6000.0/script-reference/unityengine/uielements/visualelement/style.md)                                 | Sets the style values on a [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [styleSheets](/engine/6000.0/script-reference/unityengine/uielements/visualelement/stylesheets.md)                     | Returns a [VisualElementStyleSheetSet](/engine/6000.0/script-reference/unityengine/uielements/visualelementstylesheetset.md) that manipulates style sheets attached to this element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [tooltip](/engine/6000.0/script-reference/unityengine/uielements/visualelement/tooltip.md)                             | Text to display inside an information box after the user hovers the element for a small amount of time. This is only supported in the Editor UI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [transform](/engine/6000.0/script-reference/unityengine/uielements/visualelement/transform.md)                         | Returns a transform object for this VisualElement. [ITransform](/engine/6000.0/script-reference/unityengine/uielements/itransform.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [usageHints](/engine/6000.0/script-reference/unityengine/uielements/visualelement/usagehints.md)                       | A combination of hint values that specify high-level intended usage patterns for the [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md). This property can only be set when the [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) is not yet part of a Panel. Once part of a Panel, this property becomes effectively read-only, and attempts to change it will throw an exception. The specification of proper [UsageHints](/engine/6000.0/script-reference/unityengine/uielements/usagehints.md) drives the system to make better decisions on how to process or accelerate certain operations based on the anticipated usage pattern. Note that those hints do not affect behavioral or visual results, but only affect the overall performance of the panel and the elements within. It's advised to always consider specifying the proper [UsageHints](/engine/6000.0/script-reference/unityengine/uielements/usagehints.md), but keep in mind that some [UsageHints](/engine/6000.0/script-reference/unityengine/uielements/usagehints.md) might be internally ignored under certain conditions (e.g. due to hardware limitations on the target platform). |
| [userData](/engine/6000.0/script-reference/unityengine/uielements/visualelement/userdata.md)                           | This property can be used to associate application-specific user data with this VisualElement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [viewDataKey](/engine/6000.0/script-reference/unityengine/uielements/visualelement/viewdatakey.md)                     | Used for view data persistence, such as tree expanded states, scroll position, or zoom level.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [visible](/engine/6000.0/script-reference/unityengine/uielements/visualelement/visible.md)                             | Indicates whether or not this element should be rendered.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [visualTreeAssetSource](/engine/6000.0/script-reference/unityengine/uielements/visualelement/visualtreeassetsource.md) | Stores the asset reference, if the generated element is cloned from a VisualTreeAsset.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [worldBound](/engine/6000.0/script-reference/unityengine/uielements/visualelement/worldbound.md)                       | Returns a [Rect](/engine/6000.0/script-reference/unityengine/rect.md) representing the Axis-aligned Bounding Box (AABB) after applying the world transform.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [worldTransform](/engine/6000.0/script-reference/unityengine/uielements/visualelement/worldtransform.md)               | Returns a matrix that cumulates the following operations (in order): -Local Scaling -Local Rotation -Local Translation -Layout Translation -Parent `worldTransform` (recursive definition - consider identity when there is no parent)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

## Methods

| Method                                                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Add](/engine/6000.0/script-reference/unityengine/uielements/visualelement/add.md)                                                           | Add an element to this element's contentContainer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [AddToClassList](/engine/6000.0/script-reference/unityengine/uielements/visualelement/addtoclasslist.md)                                     | Adds a class to the class list of the element in order to assign styles from USS. Note the class name is case-sensitive.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [BringToFront](/engine/6000.0/script-reference/unityengine/uielements/visualelement/bringtofront.md)                                         | Brings this element to the end of its parent children list. The element will be visually in front of any overlapping sibling elements.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Children](/engine/6000.0/script-reference/unityengine/uielements/visualelement/children.md)                                                 | Returns the elements from its contentContainer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [ClassListContains](/engine/6000.0/script-reference/unityengine/uielements/visualelement/classlistcontains.md)                               | Searches for a class in the class list of this element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [Clear](/engine/6000.0/script-reference/unityengine/uielements/visualelement/clear.md)                                                       | Remove all child elements from this element's contentContainer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [ClearBinding](/engine/6000.0/script-reference/unityengine/uielements/visualelement/clearbinding.md)                                         | Removes a binding from the element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [ClearBindings](/engine/6000.0/script-reference/unityengine/uielements/visualelement/clearbindings.md)                                       | Removes all bindings from the element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [ClearClassList](/engine/6000.0/script-reference/unityengine/uielements/visualelement/clearclasslist.md)                                     | Removes all classes from the class list of this element. [VisualElement.AddToClassList](/engine/6000.0/script-reference/unityengine/uielements/visualelement/addtoclasslist.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [Contains](/engine/6000.0/script-reference/unityengine/uielements/visualelement/contains.md)                                                 | Checks if this element is an ancestor of the specified child element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [ContainsPoint](/engine/6000.0/script-reference/unityengine/uielements/visualelement/containspoint.md)                                       | Checks if the specified point intersects with this VisualElement's layout.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [ElementAt](/engine/6000.0/script-reference/unityengine/uielements/visualelement/elementat.md)                                               | Retrieves the child element at a specific index.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [EnableInClassList](/engine/6000.0/script-reference/unityengine/uielements/visualelement/enableinclasslist.md)                               | Enables or disables the class with the given name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [FindAncestorUserData](/engine/6000.0/script-reference/unityengine/uielements/visualelement/findancestoruserdata.md)                         | Searches up the hierarchy of this VisualElement and retrieves stored userData, if any is found.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [FindCommonAncestor](/engine/6000.0/script-reference/unityengine/uielements/visualelement/findcommonancestor.md)                             | Finds the lowest common ancestor between two VisualElements inside the VisualTree hierarchy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [GetBinding](/engine/6000.0/script-reference/unityengine/uielements/visualelement/getbinding.md)                                             | Gets the binding instance for the provided targeted property.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [GetBindingInfos](/engine/6000.0/script-reference/unityengine/uielements/visualelement/getbindinginfos.md)                                   | Gets information on all the bindings of the current element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [GetClasses](/engine/6000.0/script-reference/unityengine/uielements/visualelement/getclasses.md)                                             | Retrieve the classes for this element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [GetDataSourceContext](/engine/6000.0/script-reference/unityengine/uielements/visualelement/getdatasourcecontext.md)                         | Queries the [VisualElement.dataSource](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasource.md) and [VisualElement.dataSourcePath](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasourcepath.md) of a binding object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [GetFirstAncestorOfType](/engine/6000.0/script-reference/unityengine/uielements/visualelement/getfirstancestoroftype.md)                     | Walks up the hierarchy, starting from this element's parent, and returns the first VisualElement of this type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [GetFirstOfType](/engine/6000.0/script-reference/unityengine/uielements/visualelement/getfirstoftype.md)                                     | Walks up the hierarchy, starting from this element, and returns the first VisualElement of this type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [GetHierarchicalDataSourceContext](/engine/6000.0/script-reference/unityengine/uielements/visualelement/gethierarchicaldatasourcecontext.md) | Queries the [VisualElement.dataSource](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasource.md) and [VisualElement.dataSourcePath](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasourcepath.md) inherited from the hierarchy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [HasBinding](/engine/6000.0/script-reference/unityengine/uielements/visualelement/hasbinding.md)                                             | Allows to know if a target property has a binding associated to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [IndexOf](/engine/6000.0/script-reference/unityengine/uielements/visualelement/indexof.md)                                                   | Retrieves the child index of the specified VisualElement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Insert](/engine/6000.0/script-reference/unityengine/uielements/visualelement/insert.md)                                                     | Insert an element into this element's contentContainer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [MarkDirtyRepaint](/engine/6000.0/script-reference/unityengine/uielements/visualelement/markdirtyrepaint.md)                                 | Triggers a repaint of the [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) on the next frame. This method is called internally when a change occurs that requires a repaint, such as when UIElements.[BaseField\<TValueType>.value](/engine/6000.0/script-reference/unityengine/uielements/basefield1/value.md) is changed or the text in a [Label](/engine/6000.0/script-reference/unityengine/uielements/label.md). If you are implementing a custom control, you can call this method to trigger a repaint when a change occurs that requires a repaint such as when using [VisualElement.generateVisualContent](/engine/6000.0/script-reference/unityengine/uielements/visualelement/generatevisualcontent.md) to render a mesh and the mesh data has now changed. |
| [PlaceBehind](/engine/6000.0/script-reference/unityengine/uielements/visualelement/placebehind.md)                                           | Places this element right before the sibling element in their parent children list. If the element and the sibling position overlap, the element will be visually behind of its sibling.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [PlaceInFront](/engine/6000.0/script-reference/unityengine/uielements/visualelement/placeinfront.md)                                         | Places this element right after the sibling element in their parent children list. If the element and the sibling position overlap, the element will be visually in front of its sibling.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Remove](/engine/6000.0/script-reference/unityengine/uielements/visualelement/remove.md)                                                     | Removes this child from the [VisualElement.contentContainer](/engine/6000.0/script-reference/unityengine/uielements/visualelement/contentcontainer.md)[VisualElement.hierarchy](/engine/6000.0/script-reference/unityengine/uielements/visualelement/hierarchy-1.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [RemoveAt](/engine/6000.0/script-reference/unityengine/uielements/visualelement/removeat.md)                                                 | Remove the child element located at this position from this element's contentContainer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [RemoveFromClassList](/engine/6000.0/script-reference/unityengine/uielements/visualelement/removefromclasslist.md)                           | Removes a class from the class list of the element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [RemoveFromHierarchy](/engine/6000.0/script-reference/unityengine/uielements/visualelement/removefromhierarchy.md)                           | Removes this element from its parent hierarchy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [SendEvent](/engine/6000.0/script-reference/unityengine/uielements/visualelement/sendevent.md)                                               | Sends an event to the event handler.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [SendToBack](/engine/6000.0/script-reference/unityengine/uielements/visualelement/sendtoback.md)                                             | Sends this element to the beginning of its parent children list. The element will be visually behind any overlapping sibling elements.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [SetBinding](/engine/6000.0/script-reference/unityengine/uielements/visualelement/setbinding.md)                                             | Assigns a binding between a target and a source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [SetEnabled](/engine/6000.0/script-reference/unityengine/uielements/visualelement/setenabled.md)                                             | Changes the [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) enabled state. A disabled visual element does not receive most events.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Sort](/engine/6000.0/script-reference/unityengine/uielements/visualelement/sort.md)                                                         | Reorders child elements from this VisualElement contentContainer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [ToggleInClassList](/engine/6000.0/script-reference/unityengine/uielements/visualelement/toggleinclasslist.md)                               | Toggles between adding and removing the given class name from the class list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [TryGetBinding](/engine/6000.0/script-reference/unityengine/uielements/visualelement/trygetbinding.md)                                       | Gets the binding instance for the provided targeted property.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [TryGetDataSourceContext](/engine/6000.0/script-reference/unityengine/uielements/visualelement/trygetdatasourcecontext.md)                   | Queries the [VisualElement.dataSource](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasource.md) and [VisualElement.dataSourcePath](/engine/6000.0/script-reference/unityengine/uielements/visualelement/datasourcepath.md) of a binding object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [TryGetLastBindingToSourceResult](/engine/6000.0/script-reference/unityengine/uielements/visualelement/trygetlastbindingtosourceresult.md)   | Returns the last [BindingResult](/engine/6000.0/script-reference/unityengine/uielements/bindingresult.md) of a binding object from the UI to the data source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [TryGetLastBindingToUIResult](/engine/6000.0/script-reference/unityengine/uielements/visualelement/trygetlastbindingtouiresult.md)           | Returns the last [BindingResult](/engine/6000.0/script-reference/unityengine/uielements/bindingresult.md) of a binding object from the data source to the UI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

## Classes

| Class                                                                                                                          | Description                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [VisualElement.UxmlSerializedData](/engine/6000.0/script-reference/unityengine/uielements/visualelement/uxmlserializeddata.md) | This is used by the code generator when a custom control is using the [UxmlElementAttribute](/engine/6000.0/script-reference/unityengine/uielements/uxmlelementattribute.md). |

## Structs

| Struct                                                                                                       | Description                                                               |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| [VisualElement.Hierarchy](/engine/6000.0/script-reference/unityengine/uielements/visualelement/hierarchy.md) | Hierarchy is a struct allowing access to the hierarchy of visual elements |

## Enums

| Enum                                                                                                             | Description                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [VisualElement.MeasureMode](/engine/6000.0/script-reference/unityengine/uielements/visualelement/measuremode.md) | The modes available to measure [VisualElement](/engine/6000.0/script-reference/unityengine/uielements/visualelement.md) sizes. |

## Inheritance

**Inherited Members:**

* [Focusable.Blur()](/engine/6000.0/script-reference/unityengine/uielements/focusable/blur.md)
* [Focusable.focusController](/engine/6000.0/script-reference/unityengine/uielements/focusable/focuscontroller.md)
* [Focusable.focusable](/engine/6000.0/script-reference/unityengine/uielements/focusable/focusable.md)
* [Focusable.tabIndex](/engine/6000.0/script-reference/unityengine/uielements/focusable/tabindex.md)
* [Focusable.delegatesFocus](/engine/6000.0/script-reference/unityengine/uielements/focusable/delegatesfocus.md)
* [Focusable.canGrabFocus](/engine/6000.0/script-reference/unityengine/uielements/focusable/cangrabfocus.md)
* [CallbackEventHandler.RegisterCallback\<T>(EventCallback\<T>, TrickleDown)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/registercallback.md)
* [CallbackEventHandler.RegisterCallbackOnce\<T>(EventCallback\<T>, TrickleDown)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/registercallbackonce.md)
* [CallbackEventHandler.RegisterCallback\<T, U>(EventCallback\<T, T>, T, TrickleDown)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/registercallback.md)
* [CallbackEventHandler.RegisterCallbackOnce\<T, U>(EventCallback\<T, T>, T, TrickleDown)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/registercallbackonce.md)
* [CallbackEventHandler.UnregisterCallback\<T>(EventCallback\<T>, TrickleDown)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/unregistercallback.md)
* [CallbackEventHandler.UnregisterCallback\<T, U>(EventCallback\<T, T>, TrickleDown)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/unregistercallback.md)
* [CallbackEventHandler.HasTrickleDownHandlers()](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/hastrickledownhandlers.md)
* [CallbackEventHandler.HasBubbleUpHandlers()](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/hasbubbleuphandlers.md)
* [CallbackEventHandler.HandleEventBubbleUp(EventBase)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/handleeventbubbleup.md)
* [CallbackEventHandler.HandleEventTrickleDown(EventBase)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/handleeventtrickledown.md)
* [CallbackEventHandler.NotifyPropertyChanged(BindingId)](/engine/6000.0/script-reference/unityengine/uielements/callbackeventhandler/notifypropertychanged.md)
