Caret
Represents a special TextBox used to insert text in RadRichTextBox
Definition
Namespace:Telerik.Windows.Documents.UI
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class Caret : TextBox
Inheritance: objectCaret
Constructors
Properties
Represents the base line offset of the caret in the UI component.
public float CaretBaseLineOffset { get; }
Returns the current IME language.
public ImeLanguage CurrentImeLanguage { get; }
Gets or sets a value indicating whether asynchronous text insertion is enabled.
protected bool EnableAsynchronousTextInsertion { get; set; }
true if asynchronous text insertion is enabled; otherwise, false.
Represents the state of the input caret within a document, providing information about its position and behavior during text editing operations.
public InputStates InputState { get; protected set; }
Gets or sets a value indicating whether the caret is blinking.
public bool IsBlinking { get; set; }
true if the caret is blinking; otherwise, false.
protected InputEvents LastInputEvent { get; set; }
Gets or sets the minimum interval (in milliseconds) between two consecutive raises of TextInserted event.
The value is respected only when EnableAsynchronousTextInsertion is true.
The default value is 15.
protected int MinimumTextInsertedInterval { get; set; }
The minimum interval (in milliseconds) between two consecutive raises of TextInserted event.
Gets or sets the text contents of the text box, with all new lines removed.
public string Text { get; set; }
Gets or sets whether you want to use the previous version of Microsoft IME.
public bool UsePreviousVersionOfMicrosoftIme { get; set; }
Methods
protected override Size ArrangeOverride(Size arrangeBounds)
Size
Clears the text currently in the caret.
protected void ClearText()
protected virtual void FinishComposition()
Hides the caret.
public void Hide()
Is called when a control template is applied.
public override void OnApplyTemplate()
protected override void OnGotFocus(RoutedEventArgs e)
protected virtual void OnImeCaretMoved(ImeCaretMovedEventArgs args)
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Invoked whenever an unhandled attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event.
protected override void OnKeyDown(KeyEventArgs e)
Provides data about the event.
protected override void OnLostFocus(RoutedEventArgs e)
Invoked when an unhandled routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.
Called when the occurs.
protected override void OnPreviewKeyDown(KeyEventArgs e)
The event data.
protected virtual void OnTextChanged()
Is called when content in this editing control changes.
protected override void OnTextChanged(TextChangedEventArgs e)
The arguments that are associated with the event.
Invoked whenever an unhandled attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event.
protected override void OnTextInput(TextCompositionEventArgs e)
Provides data about the event.
protected virtual void OnTextInputStart(object sender, TextCompositionEventArgs e)
protected virtual void OnTextInputUpdate(object sender, TextCompositionEventArgs e)
Called when text is inserted in the caret, but not often than MinimumTextInsertedInterval.
protected virtual void OnTextInserted(object sender, TextInsertedEventArgs e)
The sender.
eTextInsertedEventArgsThe TextInsertedEventArgs instance containing the event data.
Sets the style of the caret in the text editor.
Makes the caret visible and blinking.
public void Show()
Events
public event EventHandler<ImeCaretMovedEventArgs> ImeCaretMoved
Occurs when text is inserted in the caret, but not more often than MinimumTextInsertedInterval.
public event EventHandler<TextInsertedEventArgs> TextInserted