ClassTextBoxWrapPanel
The wrap layout of RadTextBoxControlElement
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TextBoxWrapPanel : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, INotifyPropertyChangingEx
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementTextBoxWrapPanel
Derived Classes:
Implements:
Inherited Members
Constructors
TextBoxWrapPanel()
Initializes a new instance of the TextBoxWrapPanel class.
Declaration
public TextBoxWrapPanel()
Fields
Properties
LineSpacing
Gets or sets the spacing between lines when the TextBoxWrapPanel is in multiline mode.
Declaration
public int LineSpacing { get; set; }
Property Value
The line spacing.
Lines
Gets the logical lines of TextBoxWrapPanel.
Declaration
public LineInfoCollection Lines { get; }
Property Value
Multiline
Gets or sets a value indicating whether this TextBoxWrapPanel is multiline.
Declaration
public bool Multiline { get; set; }
Property Value
true if multiline; otherwise, false.
Text
Gets or sets the text displayed by this item.
Declaration
public override string Text { get; set; }
Property Value
The text content of the item. The default value is an empty string.
Overrides
Remarks
This property supports data binding and localization. The text can contain HTML markup when the HTML support is enabled for the containing control. Changes to this property will trigger layout updates and repainting of the item.
TextAlign
Gets or sets how the text is horizontally aligned in the element.
Declaration
public HorizontalAlignment TextAlign { get; set; }
Property Value
The horizontal text alignment.
TextLength
Gets the length of the text.
Declaration
public int TextLength { get; }
Property Value
The length of the text.
ViewportBounds
Gets the bounds of the Viewport
Methods
AddBlockDesiredSize(SizeF, LineInfo)
Adds the desired size of the block to desired size of line.
AddLineDesiredSize(LineInfo, ref SizeF)
Adds the desired size of the line to document desired size.
AreSplittedBlock(ITextBlock, ITextBlock)
Checks that tow block are splitted block
Declaration
protected virtual bool AreSplittedBlock(ITextBlock firstBlock, ITextBlock secondBlock)
Parameters
firstBlock
The first block.
secondBlock
The second block.
Returns
ArrangeOverride(SizeF)
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
BinarySearch(LineInfo, IComparer)
Search a line by using concrete comparer
Declaration
protected virtual ITextBlock BinarySearch(LineInfo line, IComparer comparer)
Parameters
line
The line.
comparer
The comparer.
Returns
BinarySearchTextBlockByOffset(LineInfo, int)
Search a text block by offset.
Declaration
public ITextBlock BinarySearchTextBlockByOffset(LineInfo line, int offset)
Parameters
line
The line.
offset
The offset.
Returns
BinarySearchTextBlockByXCoordinate(LineInfo, float)
Search a text block by X coordinate.
Declaration
public ITextBlock BinarySearchTextBlockByXCoordinate(LineInfo line, float x)
Parameters
line
The line.
x
The x.
Returns
ClampDesiredSize(SizeF, SizeF)
Clamps the desired size in the valid available size bounds.
ContainsNewLine(string)
Determines whether the text contains a new line
CreateBlock(string, Type)
Declaration
protected virtual ITextBlock CreateBlock(string text, Type type)
Parameters
text
The text
type
The type.
Returns
CreateNewLine(ITextBlock, ref SizeF, ref int)
Declaration
protected virtual LineInfo CreateNewLine(ITextBlock block, ref SizeF desiredSize, ref int lineIndex)
Parameters
block
desiredSize
lineIndex
Returns
CreateTextBlocksOverride(string)
Declaration
protected virtual void CreateTextBlocksOverride(string text)
Parameters
text
GetBaselineOffset(LineInfo, ITextBlock)
Gets the baseline offset.
Declaration
protected virtual float GetBaselineOffset(LineInfo line, ITextBlock textBlock)
Parameters
line
The line.
textBlock
The text block.
Returns
GetBlockText(ITextBlock, int, int)
Gets the block's text.
Declaration
protected virtual string GetBlockText(ITextBlock block, int start, int length)
Parameters
block
The block.
start
The start.
length
The length.
Returns
GetLineInfo(int)
Gets the line info by its index
GetNextBlock(int)
Gets the next block for this index
Declaration
protected ITextBlock GetNextBlock(int index)
Parameters
index
The index.
Returns
GetPreviousBlock(int)
Gets the previous block for this index
Declaration
protected ITextBlock GetPreviousBlock(int index)
Parameters
index
The index.
Returns
GetTextRange(TextPosition, TextPosition)
Gets the text between start and end position
Declaration
public string GetTextRange(TextPosition startPosition, TextPosition endPosition)
Parameters
startPosition
The start position.
endPosition
The end position.
Returns
HasText()
Determines whether this panel has text.
Declaration
public bool HasText()
Returns
true if this panel has text; otherwise, false.
InitializeFields()
Initializes the internal fields and components of the LightVisualElement. This method sets up text primitives, image primitives, and layout management components.
Declaration
protected override void InitializeFields()
Overrides
InvalidateLayout()
Performs measurement and arrangement of child elements.
Declaration
protected void InvalidateLayout()
IsCarriageReturn(string)
Determines whether the text is carriage return symbol.
IsLineFeed(string)
Determines whether the text is line feed symbol.
IsSpecialText(string)
Determines whether the text is tab, whitespace, line feed or carriage return symbol.
IsTab(string)
Determines whether the specified text is tab.
IsTabOrWhitespace(string)
Determines whether the text is tab or whitespace.
IsWhitespace(string)
Determines whether the specified text is whitespace.
MeasureOverride(SizeF)
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
MeasureTextBlock(ITextBlock, SizeF)
Declaration
protected void MeasureTextBlock(ITextBlock textBlock, SizeF availableSize)
Parameters
textBlock
availableSize
MeasureTextBlockOverride(ITextBlock, SizeF)
Declaration
protected virtual void MeasureTextBlockOverride(ITextBlock textBlock, SizeF availableSize)
Parameters
textBlock
availableSize
MeasureWrap(SizeF, int, ref SizeF, ref int, ref int)
Measures and perfroms wrapping for blocks in WordWrap mode
Declaration
protected virtual bool MeasureWrap(SizeF availableSize, int blockIndex, ref SizeF desiredSize, ref int currentLineIndex, ref int offset)
Parameters
availableSize
The available size.
blockIndex
Index of the current block.
desiredSize
Document desired size.
currentLineIndex
Index of the current line.
offset
The current block offset.
Returns
MergeAndMeasureBlock(ITextBlock, SizeF)
Merge and measure block.
Declaration
protected virtual void MergeAndMeasureBlock(ITextBlock textBlock, SizeF availableSize)
Parameters
textBlock
The text block.
availableSize
The available size.
NotifyCreateTextBlock(ITextBlock, string)
Declaration
protected ITextBlock NotifyCreateTextBlock(ITextBlock block, string text)
Parameters
block
text
Returns
NotifyTextChanged(string, int, TextBoxChangeAction)
Notifies the text changed.
Declaration
protected virtual void NotifyTextChanged(string text, int caretPosition, TextBoxChangeAction action)
Parameters
text
The text.
caretPosition
The caret position.
action
The action.
NotifyTextChanging(int, int, string, string, TextBoxChangeAction)
Notifies the text changing.
Declaration
protected virtual bool NotifyTextChanging(int startPosition, int length, string oldText, string newText, TextBoxChangeAction action)
Parameters
startPosition
The start position.
length
The length.
oldText
The old text.
newText
The new text.
action
The action.
Returns
OnCreateTextBlock(CreateTextBlockEventArgs)
Raises the event.
Declaration
protected virtual void OnCreateTextBlock(CreateTextBlockEventArgs e)
Parameters
e
The CreateTextBlockEventArgs instance containing the event data.
OnPropertyChanging(PropertyChangingEventArgsEx)
Raises the event.
Declaration
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
e
The PropertyChangingEventArgs instance containing the event data.
OnPropertyChanging(string, object, object)
Called when a property is changing.
OnTextBlockFormatting(ITextBlock)
Called when text block is formatting.
Declaration
protected void OnTextBlockFormatting(ITextBlock textBlock)
Parameters
textBlock
The text block.
OnTextBlockFormatting(TextBlockFormattingEventArgs)
Raises the event.
Declaration
protected virtual void OnTextBlockFormatting(TextBlockFormattingEventArgs e)
Parameters
e
The TextBlockFormattingEventArgs instance containing the event data.
OnTextChanged(EventArgs)
Raises the TextChanged event.
PaintText(IGraphics)
Renders the text content of the element, including horizontal line effects when enabled.
Declaration
protected override void PaintText(IGraphics graphics)
Parameters
graphics
The graphics context used for rendering text.
Overrides
SplitBlock(LineInfo, SizeF, ref ITextBlock, ref int)
Declaration
protected virtual bool SplitBlock(LineInfo currentLine, SizeF availableSize, ref ITextBlock textBlock, ref int offset)
Parameters
currentLine
availableSize
textBlock
offset
Returns
ToggleTextPrimitive(RadProperty)
Toggles the text primitive when text related properties are change.
Declaration
protected override void ToggleTextPrimitive(RadProperty property)
Parameters
property
The changed property.
Overrides
Events
CreateTextBlock
Occurs when an instance of ITextBlock is created
Declaration
public event CreateTextBlockEventHandler CreateTextBlock
Event Value
PropertyChanging
Occurs when a property value is changing.
Declaration
public event PropertyChangingEventHandlerEx PropertyChanging
Event Value
Implements
TextBlockFormatting
Occurs when text block is formatting.
Declaration
public event TextBlockFormattingEventHandler TextBlockFormatting
Event Value