Class Caret
Represents a special System.Windows.Controls.TextBox used to insert text in RadRichTextBox
Inheritance
Namespace: Telerik.Windows.Documents.UI
Assembly: Telerik.Windows.Documents.dll
Syntax
public class Caret : TextBox
Constructors
Caret()
Properties
CaretBaseLineOffset
Declaration
public float CaretBaseLineOffset { get; }
Property Value
System.Single
|
EnableAsynchronousTextInsertion
Gets or sets a value indicating whether asynchronous text insertion is enabled.
Declaration
protected bool EnableAsynchronousTextInsertion { get; set; }
Property Value
System.Boolean
|
Focusable
Declaration
public bool Focusable { get; set; }
Property Value
System.Boolean
|
InputState
IsBlinking
Gets or sets a value indicating whether the caret is blinking.
Declaration
public bool IsBlinking { get; set; }
Property Value
System.Boolean
|
LastInputEvent
MinimumTextInsertedInterval
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.
Declaration
protected int MinimumTextInsertedInterval { get; set; }
Property Value
System.Int32
The minimum interval (in milliseconds) between two consecutive raises of TextInserted event. |
ShouldPersist
Declaration
protected bool ShouldPersist { get; set; }
Property Value
System.Boolean
|
ShouldStartNewComposition
Declaration
protected bool ShouldStartNewComposition { get; set; }
Property Value
System.Boolean
|
Text
Gets or sets the text contents of the text box, with all new lines removed.
Declaration
public string Text { get; set; }
Property Value
System.String
|
Methods
ClearText()
Clears the text currently in the caret.
Declaration
protected void ClearText()
Hide()
Hides the caret.
Declaration
public void Hide()
OnApplyTemplate()
Is called when a control template is applied.
Declaration
public override void OnApplyTemplate()
OnImeCaretMoved(ImeCaretMovedEventArgs)
Declaration
protected virtual void OnImeCaretMoved(ImeCaretMovedEventArgs args)
Parameters
ImeCaretMovedEventArgs
args
|
OnKeyDown(KeyEventArgs)
Invoked whenever an unhandled System.Windows.Input.Keyboard.KeyDown attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs
e
Provides data about the event. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs
e
The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released. |
OnTextInput(TextCompositionEventArgs)
Declaration
protected override void OnTextInput(TextCompositionEventArgs e)
Parameters
System.Windows.Input.TextCompositionEventArgs
e
|
OnTextInputStart(TextCompositionEventArgs)
Declaration
protected override void OnTextInputStart(TextCompositionEventArgs e)
Parameters
System.Windows.Input.TextCompositionEventArgs
e
|
OnTextInputUpdate(TextCompositionEventArgs)
Declaration
protected override void OnTextInputUpdate(TextCompositionEventArgs e)
Parameters
System.Windows.Input.TextCompositionEventArgs
e
|
OnTextInserted(Object, TextInsertedEventArgs)
Called when text is inserted in the caret, but not often than MinimumTextInsertedInterval.
Declaration
protected virtual void OnTextInserted(object sender, TextInsertedEventArgs e)
Parameters
System.Object
sender
The sender. |
TextInsertedEventArgs
e
The TextInsertedEventArgs instance containing the event data. |
SetStyle(Double, Boolean, Color)
Declaration
public void SetStyle(double fontSize, bool isItalic, Color caretColor)
Parameters
System.Double
fontSize
|
System.Boolean
isItalic
|
System.Windows.Media.Color
caretColor
|
Show()
Makes the caret visible and blinking.
Declaration
public void Show()
Events
ImeCaretMoved
Declaration
public event EventHandler<ImeCaretMovedEventArgs> ImeCaretMoved
Event Type
System.EventHandler<ImeCaretMovedEventArgs>
|
TextInserted
Occurs when text is inserted in the caret, but not more often than MinimumTextInsertedInterval.
Declaration
public event EventHandler<TextInsertedEventArgs> TextInserted
Event Type
System.EventHandler<TextInsertedEventArgs>
|