New to Telerik UI for WPF? Start a free 30-day trial

Caret

Class

Represents a caret for code editor.

Definition

Namespace:Telerik.Windows.Controls.SyntaxEditor.UI

Assembly:Telerik.Windows.Controls.SyntaxEditor.dll

Syntax:

C#
public class Caret : Control

Inheritance: objectCaret

Constructors

Initializes a new instance of the Caret class.

C#
public Caret()

Fields

CaretBrushProperty

DependencyProperty

Identifies the CaretBrush dependency property.

C#
public static readonly DependencyProperty CaretBrushProperty

Properties

Gets or sets the brush used for the carets.

C#
public Brush CaretBrush { get; set; }

Caret display mode.

C#
public CaretDisplayMode DisplayMode { get; set; }

Gets or sets a value indicating whether [should invert fore color].

C#
public bool ShouldInvertForeColor { get; set; }
Property Value:

true if [should invert fore color]; otherwise, false.

Methods

Tries to focus the caret.

C#
public bool Focus()
Returns:

bool

Hides the caret.

C#
public void Hide()
C#
public override void OnApplyTemplate()

Invoked whenever an unhandled event reaches this element in its route.

C#
protected override void OnGotFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The RoutedEventArgs that contains the event data.

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Handles the event.

C#
protected virtual void OnTextInserted(object sender, TextInsertedEventArgs e)
Parameters:senderobject

The sender.

eTextInsertedEventArgs

The TextInsertedEventArgs instance containing the event data.

Sets the font size of the caret.

C#
public void SetFontSize(double fontSize)
Parameters:fontSizedouble

Shows the caret.

C#
public bool Show()
Returns:

bool

Updates the UI.

C#
public void UpdateUI()

Events

Occurs when text is inserted.

C#
public event EventHandler<TextInsertedEventArgs> TextInserted

Occurs when [update executed].

C#
public event EventHandler UpdateExecuted