# Edit the Layout

* [Overview](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/edit-the-layout#overview)
* [Manipulation Pane](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/edit-the-layout#manipulation-pane)
* [Drag and Drop](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/edit-the-layout#drag-and-drop)
* [Resizing](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/edit-the-layout#resizing)

## Overview

**RadLayoutControl** supports rerranging and editing its layout at runtime. You can change the position, alignment and size of each layout group or UIElement that is direct child of a group or the control itself. Also, each group or UIElement can be removed from the layout. In order to do that the control should be in edit mode. This is done by setting the **IsInEditMode** property of **RadLayoutControl** to **True**.

**Example 1: Setting IsInEditMode in XAML**

```XAML
<telerik:RadLayoutControl x:Name="layoutControl" IsInEditMode="True" />
```

**Example 2: Setting IsInEditMode in code**

```C#
this.layoutControl.IsInEditMode = true;
```

Setting the property to True will allow you to select the visual elements and groups, and drag them around.

## Manipulation Pane

The manipulation pane allows control over the arrangement of the selected element. When the edit mode is enabled you can select the elements in the layout control. The pane will be displayed horizontally centered under the selected element.

> caption RadLayoutControl manipulation pane

![WPF RadLayoutControl RadLayoutControl Manipulation Pane](https://www.telerik.com/products/wpf/documentation/assets/d87bd6c2906bd12a0744b5ea344a0d1e/layoutcontrol-features-edit-the-layout-01.png)

The following actions can be executed through the pane:

* **Delete**: The element is removed from the layout control.

* **Select Parent**: The selection is changed to the parent layout group\_\_. If there is no parent group, the selection won't be changed.

> caption Selecting the parent group

```
![WPF RadLayoutControl Selecting the parent group](images/layoutcontrol-features-edit-the-layout-02.png)
```

* You can define the **horizontal alignment** of the selected element. There are the following options:
  * **Stretch** (the default value): The element is horizontally stretched in the available space. **Example 1** demonstrates stretch alignment.
  * **Center**: The element is centered horizontally in the available space.
  * **Left**: The element is horizontally left aligned in the available space.
  * **Right**: The element is horizontally right aligned in the available space.

> caption The horizontal alignment options

```
![WPF RadLayoutControl The horizontal alignment options](images/layoutcontrol-features-edit-the-layout-03.png)
	
```

* You can define the **vertical alignment** of the selected element. There are the following options:
  * **Stretch** (the default value): The element is vertically stretched in the available space. **Example 1** demonstrates stretch alignment.
  * **Center**: The element is centered vertically in the available space.
  * **Top**: The element is vertically left aligned in the available space.
  * **Bottom**: The element is vertically right aligned in the available space.

> caption The vertical alignment options

```
![WPF RadLayoutControl The vertical alignment options](images/layoutcontrol-features-edit-the-layout-04.png)
```

> The alignment options work with the **VerticalAlignment** and **HorizontalAlignment** properties of the selected component. By default the elements are vertically and horizontally stretched. Setting the alignment properties manually will affect the selected option in the manipulation pane.



> You can read more about the ordering and alignment of the items in the layout control in the [Layout Panel](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/getting-started/layout-panel) help article.

## Drag and Drop

The drag and drop feature of the control gives you the ability to rearrange the elements in the layout. When an item is selected you can drag and drop it over another position. The allowed positions where the dragged item can be dropped are displayed with the [LayoutControlDropIndicator](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/visual-structure) element.

> caption Dragging an element triggers the logic that displays the drop indicators.

![WPF RadLayoutControl Dragging an element triggers the logic that displays the drop indicators.](https://www.telerik.com/products/wpf/documentation/assets/15821e50bc3a8c936a797404d53cdfc2/layoutcontrol-features-edit-the-layout-05.png)

> Depending on the drop position the layout control can change a panel's orientation or auto-generate additional layout groups.

## Resizing

The items in the layout control can be resized by dragging their resize handles placed on their top, bottom, left and right borders.

> caption Resizing

![WPF RadLayoutControl Resizing](https://www.telerik.com/products/wpf/documentation/assets/99ffdc59260c31b0f8c5de279a027324/layoutcontrol-features-edit-the-layout-06.png)

Setting the **Height** and **Width** of the selected element (UIElement or LayoutControlGroup) will also resize it.

> The ManipulationPane of the control will always be horizontally aligned at the center of the selected element.

## See Also

* [Overview](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/overview)
* [Getting Started](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/getting-started/getting-started)
* [Layout Groups Overview](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/layoutgroups/overview)
* [Orientation](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/orientation)
* [Edit the Layout](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/edit-the-layout)
* [Layout Panel](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/getting-started/layout-panel)
* [Visual Structure](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/visual-structure)
