# VisualElement.MeasureMode

> The modes available to measure VisualElement sizes.

## Definition

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

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

## Remarks

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

## Fields

| Value                                                                                                        | Description                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [AtMost](/engine/6000.7/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.7/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).     |
| [MinContent](/engine/6000.7/script-reference/unityengine/uielements/visualelement/measuremode/mincontent.md) | Min Content. The element should give the smallest width/height it can occupy without its content overflowing (for text, the width of the longest unbreakable run). |
| [Undefined](/engine/6000.7/script-reference/unityengine/uielements/visualelement/measuremode/undefined.md)   | The element should give its preferred width/height without any constraint.                                                                                         |
