# transform

> Returns a transform styles object for this VisualElement.

## Definition

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

> **Warning:**
>
> **Deprecated.** When writing the value, use VisualElement.style.translate, VisualElement.style.rotate or VisualElement.style.scale instead. When reading the value, use VisualElement.resolvedStyle.translate, scale and rotate

```csharp
public ITransform transform { get; }
```

### Remarks

The transform styles object contains the position, rotation, scale style properties of this VisualElement. **Note**: This transform object is different and separate from the GameObject Transform MonoBehaviour. The three interface members write to the visual element's inline style and read from the resolved style. However, the [VisualElement.style](/engine/6000.7/script-reference/unityengine/uielements/visualelement/style.md) API offers more features and is the recommended approach. For example, you can set translate and position as percentages through the [VisualElement.style](/engine/6000.7/script-reference/unityengine/uielements/visualelement/style.md) API.

The following example reads the current position, rotation, and scale from the resolvedStyle of a VisualElement, then updates the style properties with these values.

### Examples

```csharp
var visualElement = new VisualElement();
Vector3 position = visualElement.resolvedStyle.translate;
visualElement.style.translate = new Translate(position.x, position.y, position.z);
Quaternion rotation = visualElement.resolvedStyle.rotate.ToQuaternion();
visualElement.style.rotate = new Rotate(rotation);
Vector3 scale = visualElement.resolvedStyle.scale.value;
visualElement.style.scale = new Scale((Vector2) scale);
```
