# RectangleRuntime

The RectangleRuntime object can be used to draw a single-pixel-wide rectangle. It can either have a solid outline or dotted, and can display any color. RectangleRuntimes only draw outlines. For filled rectangles see the [ColoredRectangleRuntime](https://docs.flatredball.com/gum/code/standard-elements/coloredrectangleruntime) type.

### Code Example

The following code creates a RectangleRuntime:

```csharp
var lineRectangle = new RectangleRuntime();
lineRectangle.Width = 120;
lineRectangle.Height = 24;
lineRectangle.Color = Color.Pink;  // This is a Microsoft.Xna.Framework.Color
container.Children.Add(lineRectangle);
```

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-a357e281bf9a347015d44281c6c5e1d8db96efc2%2Fimage.png?alt=media" alt=""><figcaption><p>RectangleRuntime instantiated in code</p></figcaption></figure>
