ClassTextBoxViewElement
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
TextBoxViewElement()
Declaration
public TextBoxViewElement()
Properties
HScroller
Gets or sets the scroller for Horizontal Scrollbar
Declaration
public TextBoxScroller HScroller { get; set; }
Property Value
The Horizontal Scroller
IsEditing
Gets a value indicating whether this textbox is editing mode.
Declaration
public bool IsEditing { get; }
Property Value
true if this textbox is editing; otherwise, false.
IsReadOnly
Gets or sets a value indicating whether text in the text box is read-only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
true if this is in read only mode; otherwise, false.
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line
ScrollOffset
Gets or sets the scroll offset.
Declaration
public SizeF ScrollOffset { get; set; }
Property Value
The scroll offset.
SelectionPrimitive
Gets or sets the selection primitive that renders the selection
Declaration
public TextBoxSelectionPrimitive SelectionPrimitive { get; set; }
Property Value
The selection primitive.
UseSystemPasswordChar
Gets or sets a value indicating whether the text in view should appear as the default password character.
Declaration
public virtual bool UseSystemPasswordChar { get; set; }
Property Value
VScroller
Gets or sets the scroller for Vertical Scrollbar
Declaration
public TextBoxScroller VScroller { get; set; }
Property Value
The Vertical Scroller
Methods
BeginEditUpdate()
Suspends notifcations when text is editing.
Declaration
public void BeginEditUpdate()
ClampDesiredSize(SizeF, SizeF)
Clamps the desired size in the valid available size bounds.
Delete(TextPosition, TextPosition)
Deletes the text range
Declaration
public bool Delete(TextPosition startPosition, TextPosition endPosition)
Parameters
startPosition
The start position.
endPosition
The end position.
Returns
DisposeManagedResources()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
Declaration
protected override void DisposeManagedResources()
Overrides
DpiScaleChanged(SizeF)
Called when the DPI scale factor changes. Updates the scale factor and notifies child elements.
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
scaleFactor
The new DPI scale factor.
Overrides
EndEditUpdate()
Resumes notifcations when text is editing.
Declaration
public void EndEditUpdate()
EndEditUpdate(bool, string, int, TextBoxChangeAction)
Resumes notifcations when text is editing.
Declaration
public virtual void EndEditUpdate(bool notify, string newText, int caretPosition, TextBoxChangeAction action)
Parameters
notify
if set to true the event is fired.
newText
The new text.
caretPosition
The caret position.
action
The action.
GetClientRectangle(SizeF)
Declaration
protected override RectangleF GetClientRectangle(SizeF finalSize)
Parameters
finalSize
Returns
Overrides
GetLocation(TextPosition)
Gets the location of TextPosition instance
Declaration
public PointF GetLocation(TextPosition position)
Parameters
position
The position.
Returns
Insert(TextPosition, string)
Inserts the specified text in concerte position.
Declaration
public bool Insert(TextPosition startPosition, string text)
Parameters
startPosition
The position.
text
The text.
Returns
MeasureOverride(SizeF)
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the standard .NET PropertyChanged event to notify subscribers of property value changes using the provided event arguments.
Declaration
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
The PropertyChangedEventArgs containing the property change information.
Overrides
OnPropertyChanging(PropertyChangingEventArgsEx)
Raises the event.
Declaration
protected override void OnPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
e
The PropertyChangingEventArgs instance containing the event data.
Overrides
PaintChildren(IGraphics, Rectangle, float, SizeF, bool)
Paints the child elements of this visual element with opacity support.
Declaration
protected override void PaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale, bool useRelativeTransformation)
Parameters
graphics
The graphics object used for painting.
clipRectange
angle
The rotation angle to apply during painting.
scale
The scale factor to apply during painting.
useRelativeTransformation
True to use relative transformation; otherwise, false.
Overrides
PointToAbsolute(PointF)
Convert point to absolute point according to the current scroll offset
RemoveBlockRange(ITextBlock, int, ITextBlock, int, ref int)
Declaration
protected virtual ITextBlock RemoveBlockRange(ITextBlock startBlock, int startCharPosition, ITextBlock endBlock, int endCharPosition, ref int position)
Parameters
startBlock
startCharPosition
endBlock
endCharPosition
position
Returns
Replace(TextPosition, TextPosition, string)
Replaces the text ranged with a new text
Declaration
public bool Replace(TextPosition startPosition, TextPosition endPosition, string text)
Parameters
startPosition
The start position.
endPosition
The end position.
text
The text.
Returns
ReplaceOverride(TextPosition, TextPosition, string)
Replaces the text ranged with a new text
Declaration
protected virtual void ReplaceOverride(TextPosition startPosition, TextPosition endPosition, string text)
Parameters
startPosition
The start position.
endPosition
The end position.
text
The text.
ReplaceSpecialTextBlock(ITextBlock, int, int, string)
Replaces the text range in concrete special ITextBlock
Declaration
protected virtual void ReplaceSpecialTextBlock(ITextBlock targetBlock, int startCharPosition, int endCharPosition, string text)
Parameters
targetBlock
The target block.
startCharPosition
The start char position.
endCharPosition
The end char position.
text
The text.
ReplaceTextBlock(ITextBlock, int, int, string)
Replaces the text range in concrete non-special ITextBlock
Declaration
protected virtual void ReplaceTextBlock(ITextBlock targetBlock, int startCharPosition, int endCharPosition, string text)
Parameters
targetBlock
The target block.
startCharPosition
The start char position.
endCharPosition
The end char position.
text
The text.
ReplaceTextRange(ITextBlock, int, int, string)
Replaces the text range in ITextBlock
Declaration
protected virtual void ReplaceTextRange(ITextBlock targetBlock, int startCharPosition, int endCharPosition, string text)
Parameters
targetBlock
The target block.
startCharPosition
The start char position.
endCharPosition
The end char position.
text
The text.