# GridSplitter

The `GridSplitter` control is a control that allows a user to resize the space between `Grid` rows or columns.

```markup
<Grid ColumnDefinitions="*, 4, *">
    <Rectangle Grid.Column="0" Fill="Blue"/>
    <GridSplitter Grid.Column="1" Background="Black" ResizeDirection="Columns"/>
    <Rectangle Grid.Column="2" Fill="Red"/>
</Grid>
```

![GridSplitter in Action for Columns](https://4025525846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9CodmwWc6hOAzwuMGtm4%2Fuploads%2Fgit-blob-820ebddc9511674666fc0af7f08bd22e242861df%2Fgridsplitter-in-action-columns.gif?alt=media)

```markup
<Grid RowDefinitions="*, 4, *">
    <Rectangle Grid.Row="0" Fill="Blue"/>
    <GridSplitter Grid.Row="1" Background="Black" ResizeDirection="Rows"/>
    <Rectangle Grid.Row="2" Fill="Red"/>
</Grid>
```

![GridSplitter in Action for Rows](https://4025525846-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9CodmwWc6hOAzwuMGtm4%2Fuploads%2Fgit-blob-630af1023316c555547979e4b947bc1cdaf924ee%2Fgridsplitter-in-action-rows.gif?alt=media)

### Reference <a href="#reference" id="reference"></a>

[GridSplitter](http://reference.avaloniaui.net/api/Avalonia.Controls/GridSplitter/)

### Source code <a href="#source-code" id="source-code"></a>

[GridSplitter.cs](https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/GridSplitter.cs)
