# Caret

The caret of the RadSyntaxEditor is the vertical "blinking" line that represents the current cursor position of a control that accepts text input. The appearance of the caret can be controlled by the `CaretDisplayMode` property. Its possible values as well as the resulting appearance can be observed in the following list:

* **Normal**: ![RadSyntaxEditor caret normal display mode](https://www.telerik.com/products/wpf/documentation/assets/20699a6c93e99b3a2d62a25ec4ca9823/syntaxeditor-caret-normal.png)

* **Block**: ![RadSyntaxEditor caret normal display mode](https://www.telerik.com/products/wpf/documentation/assets/cc2616fbc7db775a02e44b982bc0cdb2/syntaxeditor-caret-block.png)

* **HalfBlock**: ![RadSyntaxEditor caret normal display mode](https://www.telerik.com/products/wpf/documentation/assets/6b7fdea4567e49abc3d650b1a347a86a/syntaxeditor-caret-half-block.png)

* **QuarterBlock**: ![RadSyntaxEditor caret normal display mode](https://www.telerik.com/products/wpf/documentation/assets/299420b6b40ed51d38bdf00e6e53127e/syntaxeditor-caret-quarter-block.png)

**Setting the caret's display mode**

```XAML
<telerik:RadSyntaxEditor CaretDisplayMode="QuarterBlock" />
```

## Hide the Caret

If you wish to hide the caret, you can do so by setting the `IsCaretVisible` property to **False**. This setting can be used along with the `IsReadOnly` property which disallows users from making changes in the editor.

**Setting the caret's display mode**

```XAML
<telerik:RadSyntaxEditor IsReadOnly="True" IsCaretVisible="False" />
```

## Caret Brush

Through the `CaretBrush` property, you can change the caret's color to a color of your liking. The default value is **Black**.

**Setting the caret's color**

```XAML
<telerik:RadSyntaxEditor CaretBrush="Red" />
```

> caption RadSyntaxEditor caret with red color

![RadSyntaxEditor caret with red color](https://www.telerik.com/products/wpf/documentation/assets/23668e1bfbf7e5a0854d990cf7b24420/syntaxeditor-caret-red.png)

## Auto-Scroll to Caret on Text Change

The RadSyntaxEditor exposes the `AutoScrollToCaretOnTextChange` property which controls whether the document is automatically scrolled to the **CaretPosition** when the text inside the document is changed.

Its default value is **True**, meaning that if the caret is placed in the end of the document, for example, and new text is added, the control will auto-scroll to the new position of the caret when the content changes.

To disable this behavior, you can set the AutoScrollToCaretOnTextChange property to **False**.

**Setting the AutoScrollToCaretOnTextChange property**

```XAML
<telerik:RadSyntaxEditor AutoScrollToCaretOnTextChange="False" />
```

## IME Support

The `RadSyntaxEditor` control provides built-in support for the most commonly used Microsoft IMEs like Chinese IME, Japanese IME, Korean IME and etc. which are shipped with the Windows OS.

To use this feature, set the `UseMonospacedOptimization` property of `RadSyntaxEditor` to `false`.

> caption RadSyntaxEditor displaying japanese IME

![WPF RadSyntaxEditor displaying Japanese IME](https://www.telerik.com/products/wpf/documentation/assets/e0c81140116350d94a063a50de02d0f1/syntaxeditor-caret-japanese-ime.png)

## See Also

* [IntelliPrompts](https://www.telerik.com/products/wpf/documentation/controls/radsyntaxeditor/features/intelliprompts)
