# StyleLength

> Creates the Length with the value v in LengthUnit.Pixel.

## Definition

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

## StyleLength(float)

Creates the [Length](/engine/6000.5/script-reference/unityengine/uielements/length.md) with the value `v` in [LengthUnit.Pixel](/engine/6000.5/script-reference/unityengine/uielements/lengthunit/pixel.md).

```csharp
public StyleLength(float v)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

## StyleLength(Length)

Creates from either a [Length](/engine/6000.5/script-reference/unityengine/uielements/length.md) or a [StyleKeyword](/engine/6000.5/script-reference/unityengine/uielements/stylekeyword.md).

```csharp
public StyleLength(Length v)
```

### Parameters

**** (\[Length]\(/engine/6000.5/script-reference/unityengine/uielements/length)):&#x20;

## StyleLength(StyleKeyword)

Creates from either a [Length](/engine/6000.5/script-reference/unityengine/uielements/length.md) or a [StyleKeyword](/engine/6000.5/script-reference/unityengine/uielements/stylekeyword.md).

```csharp
public StyleLength(StyleKeyword keyword)
```

### Parameters

**** (\[StyleKeyword]\(/engine/6000.5/script-reference/unityengine/uielements/stylekeyword)):&#x20;
