# VisualElement.MeasureMode

> The modes available to measure VisualElement sizes.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public enum VisualElement.MeasureMode
```

## Remarks

Additional Resources: [TextElement.MeasureTextSize](/engine/6000.0/script-reference/unityengine/uielements/textelement/measuretextsize.md)

## Fields

| Value                                                                                                      | Description                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AtMost](/engine/6000.0/script-reference/unityengine/uielements/visualelement/measuremode/atmost.md)       | At Most. The element should give its preferred width/height but no more than the value passed.                                                                 |
| [Exactly](/engine/6000.0/script-reference/unityengine/uielements/visualelement/measuremode/exactly.md)     | The element should give the width/height that is passed in and derive the opposite site from this value (for example, calculate text size from a fixed width). |
| [Undefined](/engine/6000.0/script-reference/unityengine/uielements/visualelement/measuremode/undefined.md) | The element should give its preferred width/height without any constraint.                                                                                     |
