# RightToLeft

Wisej.NET supports Right-to-Left and Right-to-Left-Layout (mirroring) quite extensively in most controls, in the themes, in the [Theme Builder](https://docs.wisej.com/theme-builder), and in the designer.

{% hint style="danger" %}
The following controls do not fully support RightToLeft at the moment: `DataGridView`, `ListView`, `PropertyGrid`.
{% endhint %}

## RightToLeft Property

The [`RightToLeft`](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.righttoleft) property makes a control adapt its internal layout and alignment for right-to-left languages. The default value is `Inherit`, which works in most cases. However, an application can:

* Force a control to ignore right-to-left mode by setting the value to `No`
* Force right-to-left mode by setting the value to `Yes`

This property is localizable.

## RightToLeftLayout Property

The [`RightToLeftLayout`](https://docs.wisej.com/api/wisej.web/containers/containercontrol#righttoleftlayout) property mirrors the horizontal position of a container's direct children. The default value is `false`.

When set to `true`, horizontal layout is mirrored only when [`RightToLeft`](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.righttoleft) resolves to `Yes`.

Set this property to:

* `false` to prevent Wisej.NET from mirroring layout in right-to-left mode
* `true` to mirror horizontal location of direct children in right-to-left mode

This property is localizable.

## Application.RightToLeft Property

[`Application.RightToLeft`](https://docs.wisej.com/api/wisej.web/general/application#righttoleft) takes its value from:

* The "rightToLeft" [Configuration](https://docs.wisej.com/docs/concepts/configuration) setting
* Can be forced to `true` or `false` programmatically

The default value of [`Control.RightToLeft`](https://docs.wisej.com/api/wisej.web/general/control#righttoleft) is `Inherit`, meaning a control inherits the value from its parent. Top-level containers and parentless controls with `RightToLeft` set to `Inherit` take their value from [`Application.RightToLeft`](https://docs.wisej.com/api/wisej.web/general/application#righttoleft).

## Themes

All Wisej.NET themes support RightToLeft mode with minimal required changes. When a widget operates in right-to-left mode, it has the "rightToLeft" state allowing theme adaptation.

Most cases need no changes. Typical right-to-left adjustments include:

* Mirroring icons
* Switching single side border location

Example of mirroring icons with a state style:

```javascript
"rightToLeft":
{
  "styles":
  {
    "transform": "scale(-1, 1)"
  }
},
```

TreeView arrows requiring 45-degree rotation when expanded and mirroring can adapt using these states:

```javascript
"rightToLeft":
{
  "styles":
  {
    "transform": "rotateZ(180deg)"
  }
},
"opened-rightToLeft":
{
  "styles":
  {
    "transform": "rotateZ(135deg)"
  }
},
```

{% hint style="info" %}
The composite state "opened-rightToLeft" qualifies styles and properties only when the widget has both states set simultaneously.
{% endhint %}


---

# 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.wisej.com/docs/concepts/righttoleft.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.
