TextBoxViewElement
An editable and selectable TextBoxWrapPanel
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TextBoxViewElement : TextBoxWrapPanel, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, INotifyPropertyChangingEx
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementTextBoxWrapPanelTextBoxViewElement...
Derived Classes:
Implements:
Inherited Members
Constructors
public TextBoxViewElement()
Properties
Gets or sets the scroller for Horizontal Scrollbar
public TextBoxScroller HScroller { get; set; }
The Horizontal Scroller
Gets a value indicating whether this textbox is editing mode.
public bool IsEditing { get; }
true if this textbox is editing; otherwise, false.
Gets or sets a value indicating whether text in the text box is read-only.
public bool IsReadOnly { get; set; }
true if this is in read only mode; otherwise, false.
Gets or sets the character used to mask characters of a password in a single-line
public virtual char PasswordChar { get; set; }
Gets or sets the scroll offset.
public SizeF ScrollOffset { get; set; }
The scroll offset.
Gets or sets the selection primitive that renders the selection
public TextBoxSelectionPrimitive SelectionPrimitive { get; set; }
The selection primitive.
Gets or sets a value indicating whether the text in view should appear as the default password character.
public virtual bool UseSystemPasswordChar { get; set; }
Gets or sets the scroller for Vertical Scrollbar
public TextBoxScroller VScroller { get; set; }
The Vertical Scroller
Methods
Suspends notifcations when text is editing.
public void BeginEditUpdate()
Deletes the text range
public bool Delete(TextPosition startPosition, TextPosition endPosition)
The start position.
endPositionTextPositionThe end position.
Returns:Disposes of managed resources including cached images and SVG images when the element is being disposed.
protected override void DisposeManagedResources()
Overrides:
Called when the DPI scale factor changes. Updates the scale factor and notifies child elements.
public override void DpiScaleChanged(SizeF scaleFactor)
The new DPI scale factor.
Overrides:
Resumes notifcations when text is editing.
public void EndEditUpdate()
Resumes notifcations when text is editing.
public virtual void EndEditUpdate(bool notify, string newText, int caretPosition, TextBoxChangeAction action)
if set to true the event is fired.
The new text.
caretPositionintThe caret position.
actionTextBoxChangeActionThe action.
protected override RectangleF GetClientRectangle(SizeF finalSize)
Overrides:
Gets the location of TextPosition instance
public PointF GetLocation(TextPosition position)
The position.
Returns:Inserts the specified text in concerte position.
public bool Insert(TextPosition startPosition, string text)
The position.
textstringThe text.
Returns:Measures the desired size of the element by calculating the space needed for content, padding, and borders.
Raises the standard .NET PropertyChanged event to notify subscribers of property value changes using the provided event arguments.
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
The PropertyChangedEventArgs containing the property change information.
Overrides:
Raises the event.
protected override void OnPropertyChanging(PropertyChangingEventArgsEx e)
The PropertyChangingEventArgs instance containing the event data.
Overrides:
Paints the child elements of this visual element with opacity support.
protected override void PaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale, bool useRelativeTransformation)
The graphics object used for painting.
clipRectangeRectangleanglefloatThe rotation angle to apply during painting.
scaleSizeFThe scale factor to apply during painting.
useRelativeTransformationboolTrue to use relative transformation; otherwise, false.
Overrides:
protected virtual ITextBlock RemoveBlockRange(ITextBlock startBlock, int startCharPosition, ITextBlock endBlock, int endCharPosition, ref int position)
Replaces the text ranged with a new text
public bool Replace(TextPosition startPosition, TextPosition endPosition, string text)
The start position.
endPositionTextPositionThe end position.
textstringThe text.
Returns:Replaces the text ranged with a new text
protected virtual void ReplaceOverride(TextPosition startPosition, TextPosition endPosition, string text)
The start position.
endPositionTextPositionThe end position.
textstringThe text.
Replaces the text range in concrete special ITextBlock
protected virtual void ReplaceSpecialTextBlock(ITextBlock targetBlock, int startCharPosition, int endCharPosition, string text)
The target block.
startCharPositionintThe start char position.
endCharPositionintThe end char position.
textstringThe text.
Replaces the text range in concrete non-special ITextBlock
protected virtual void ReplaceTextBlock(ITextBlock targetBlock, int startCharPosition, int endCharPosition, string text)
The target block.
startCharPositionintThe start char position.
endCharPositionintThe end char position.
textstringThe text.
Replaces the text range in ITextBlock
protected virtual void ReplaceTextRange(ITextBlock targetBlock, int startCharPosition, int endCharPosition, string text)
The target block.
startCharPositionintThe start char position.
endCharPositionintThe end char position.
textstringThe text.