# ZIndexMode

## Overview

ZIndexMode is an Enum that specifies the ZIndex calculation method for SurfaceGuiBase.

It is used as the ZIndexBehavior property in the SurfaceGuiBase class, determining whether ZIndex is calculated as a relative order among sibling elements or calculated globally.

## Items

| Name    | Value | Description                                                                                 |
| ------- | ----- | ------------------------------------------------------------------------------------------- |
| Sibling | 0     | ZIndex is calculated as a relative order among sibling elements that share the same parent. |
| Global  | 1     | ZIndex is calculated globally, determining the order among all SurfaceGuiBase elements.     |

## See also

{% content-ref url="/pages/aqDvNZ2SEeQ5NA0q7K1m" %}
[SurfaceGuiBase](/development/api-reference/classes/surfaceguibase.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/enums/zindexmode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
