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

  • Block: RadSyntaxEditor caret normal display mode

  • HalfBlock: RadSyntaxEditor caret normal display mode

  • QuarterBlock: RadSyntaxEditor caret normal display mode

Example 1: Setting the caret's display mode

<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.

Example 2: Setting the caret's display mode

<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.

Example 3: Setting the caret's color

<telerik:RadSyntaxEditor CaretBrush="Red" /> 

Figure 1: RadSyntaxEditor caret with red color

RadSyntaxEditor caret with red color

See Also

In this article
Not finding the help you need? Improve this article