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
|
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
ArrangeOverride(Size)
Declaration
protected override Size ArrangeOverride(Size arrangeBounds)
Parameters
System.Windows.Size
arrangeBounds
|
Returns
System.Windows.Size
|
ClearText()
Clears the text currently in the caret.
Declaration
protected void ClearText()
Hide()
Hides the caret.
Declaration
public void Hide()
IsOemKey(Key)
Declaration
protected bool IsOemKey(Key key)
Parameters
System.Windows.Input.Key
key
|
Returns
System.Boolean
|
IsShift(Key)
Declaration
protected bool IsShift(Key key)
Parameters
System.Windows.Input.Key
key
|
Returns
System.Boolean
|
OnApplyTemplate()
Is called when a control template is applied.
Declaration
public override void OnApplyTemplate()
OnGotFocus(RoutedEventArgs)
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
|
OnImeCaretMoved(ImeCaretMovedEventArgs)
Declaration
protected virtual void OnImeCaretMoved(ImeCaretMovedEventArgs args)
Parameters
ImeCaretMovedEventArgs
args
|
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
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. |
OnLostFocus(RoutedEventArgs)
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
|
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. |
OnPreviewKeyDown(KeyEventArgs)
Called when the System.Windows.UIElement.KeyDown occurs.
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs
e
The event data. |
OnTextChanged()
Declaration
protected virtual void OnTextChanged()
OnTextChanged(TextChangedEventArgs)
Is called when content in this editing control changes.
Declaration
protected override void OnTextChanged(TextChangedEventArgs e)
Parameters
System.Windows.Controls.TextChangedEventArgs
e
The arguments that are associated with the System.Windows.Controls.Primitives.TextBoxBase.TextChanged event. |
OnTextInput(TextCompositionEventArgs)
Invoked whenever an unhandled System.Windows.Input.TextCompositionManager.TextInput 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 OnTextInput(TextCompositionEventArgs e)
Parameters
System.Windows.Input.TextCompositionEventArgs
e
Provides data about the event. |
OnTextInputStart(Object, TextCompositionEventArgs)
Declaration
protected virtual void OnTextInputStart(object sender, TextCompositionEventArgs e)
Parameters
System.Object
sender
|
System.Windows.Input.TextCompositionEventArgs
e
|
OnTextInputUpdate(Object, TextCompositionEventArgs)
Declaration
protected virtual void OnTextInputUpdate(object sender, TextCompositionEventArgs e)
Parameters
System.Object
sender
|
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>
|