# Tools

**RadImageEditor** provides a set of tools that allows you to customize the image element.

The tools are activating UI which enables live preview of the operations executed by the image editor [commands](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/features/commands). When you adjust the image preview, the tool can be committed which will execute the corresponding command and register the action in the [history stack](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/features/history).

The following list shows the available [ITool](https://docs.telerik.com/devtools/wpf/api/telerik.windows.media.imaging.tools.itool) implementations.

* **BlurTool**: Uses 2 pixel shaders.

* **CanvasResizeTool**

* **ContrastTool**

* **CropTool**

* **DrawTextTool**

* [DrawTool](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/tools/drawing)

* **HueShiftTool**

* [PanTool](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/tools/panning) (not registered in the history stack)

* **ResizeTool**

* **RoundCornersTool**

* **SaturationTool**

* **SharpenTool**

* [ShapeTool](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/tools/shape-tool)

The effects in **RadImageEditor** that are implemented using pixel shaders enable the use of hardware acceleration whenever the platform supports it. This result in most effects being applied almost instantly, enabling real-time preview with sliders for the parameter values. You can easily create a command using your own custom shader by implementing **EffectCommandBase**. This approach is shown in [this blog post](http://blogs.telerik.com/blogs/posts/11-07-20/under-the-hood-of-radimageeditor-for-silverlight-and-wpf.aspx) with a sample implementation of a blur command.

> tip See the different tool setting UIs in the **ImageEditor** [demo](https://demos.telerik.com/wpf/) of RadImageEditorUI.

## Excecuting Tools

To execute a tool and display its UI, call the `ExecuteCommand` method of RadImageEditor with an instance of the corresponding tool as parameter. A tool can be excecuted also by using the [ExecuteTool command](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/features/commands).

**Example 1: Executing a tool in code**

```C#
this.radImageEditor.ExecuteTool(new BlurTool());
```

**Example 2: Executing a tool using the ExecuteTool command**

```XAML
<Grid>
    <telerik:RadImageEditor x:Name="radImageEditor" />
    <telerik:RadButton Content="Blur Tool"  
                         Command="commands:ImageEditorRoutedCommands.ExecuteTool"
                         CommandTarget="{Binding ElementName=radImageEditor}">
        <telerik:RadButton.CommandParameter>
            <tools:BlurTool />
        </telerik:RadButton.CommandParameter>
    </telerik:RadButton>
</Grid>
```

All tools are located in the Telerik.Windows.Media.Imaging.Tools namespace and can be created in XAML. `xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"`

The **commands** namespace declaration points to the following namespace: `xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"`

The tool settings UI is displayed over the image in a special container - `InlineToolSettings` element. The container is positioned over the RadImageEditor at its top left corner.

> caption Blur inline settings UI

![WPF RadImageEditor Blur inline settings UI](https://www.telerik.com/products/wpf/documentation/assets/339ca4f5fa4154d599aa882f556a1558/radimageeditor-features-tools-0.png)

When using [RadImageEditorUI](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/features/radimageeditorui) the settings UI is displayed aligned at the right side of the control.

> caption Blur settings UI in RadImageEditorUI

![WPF RadImageEditor Blur settings UI in RadImageEditorUI](https://www.telerik.com/products/wpf/documentation/assets/b46c0361129c65ee4b6194aac0d71076/radimageeditor-features-tools-1.png)

## See Also

* [Commands](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/features/commands)
* [Create a Custom Tool](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/how-to/howto-custom-tool)
