Class TextBoxWrapPanel
The wrap layout of RadTextBoxControlElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class TextBoxWrapPanel : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, INotifyPropertyChangingEx
  Constructors
TextBoxWrapPanel()
Fields
CarriageReturnSymbol
Declaration
public const char CarriageReturnSymbol = '\r'
  Field Value
| 
        System.Char
         
  | 
    
LineFeedSymbol
Declaration
public const char LineFeedSymbol = '\n'
  Field Value
| 
        System.Char
         
  | 
    
TabSymbol
Declaration
public const char TabSymbol = '\t'
  Field Value
| 
        System.Char
         
  | 
    
TextBlockElementType
Declaration
protected static readonly Type TextBlockElementType
  Field Value
| 
        System.Type
         
  | 
    
Properties
Lines
Gets the logical lines of TextBoxWrapPanel.
Declaration
public LineInfoCollection Lines { get; }
  Property Value
| 
        LineInfoCollection
         
  | 
    
LineSpacing
Gets or sets the spacing between lines when the TextBoxWrapPanel is in multiline mode.
Declaration
public int LineSpacing { get; set; }
  Property Value
| 
        System.Int32
         The line spacing.  | 
    
Multiline
Gets or sets a value indicating whether this TextBoxWrapPanel is multiline.
Declaration
public bool Multiline { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
Text
Declaration
public override string Text { get; set; }
  Property Value
| 
        System.String
         
  | 
    
Overrides
TextAlign
Gets or sets how the text is horizontally aligned in the element.
Declaration
public HorizontalAlignment TextAlign { get; set; }
  Property Value
| 
        System.Windows.Forms.HorizontalAlignment
         The horizontal text alignment.  | 
    
TextLength
Gets the length of the text.
Declaration
public int TextLength { get; }
  Property Value
| 
        System.Int32
         The length of the text.  | 
    
ViewportBounds
Gets the bounds of the Viewport
Declaration
public Rectangle ViewportBounds { get; }
  Property Value
| 
        System.Drawing.Rectangle
         
  | 
    
WordWrap
Gets or sets a value indicating whether [word wrap].
Declaration
public bool WordWrap { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
Methods
AddBlockDesiredSize(SizeF, LineInfo)
Adds the desired size of the block to desired size of line.
Declaration
protected virtual void AddBlockDesiredSize(SizeF blockDesiredSize, LineInfo line)
  Parameters
| 
        System.Drawing.SizeF
        blockDesiredSize
         Size of the block desired.  | 
    
| 
        LineInfo
        line
         The line.  | 
    
AddLineDesiredSize(LineInfo, ref SizeF)
Adds the desired size of the line to document desired size.
Declaration
protected virtual void AddLineDesiredSize(LineInfo line, ref SizeF desiredSize)
  Parameters
| 
        LineInfo
        line
         The line.  | 
    
| 
        System.Drawing.SizeF
        desiredSize
         Size of the desired.  | 
    
AreSplittedBlock(ITextBlock, ITextBlock)
Checks that tow block are splitted block
Declaration
protected virtual bool AreSplittedBlock(ITextBlock firstBlock, ITextBlock secondBlock)
  Parameters
| 
        ITextBlock
        firstBlock
         The first block.  | 
    
| 
        ITextBlock
        secondBlock
         The second block.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
  Parameters
| 
        System.Drawing.SizeF
        finalSize
         
  | 
    
Returns
| 
        System.Drawing.SizeF
         
  | 
    
Overrides
ArrangeWithCenterAlignment(SizeF)
Declaration
protected virtual SizeF ArrangeWithCenterAlignment(SizeF finalSize)
  Parameters
| 
        System.Drawing.SizeF
        finalSize
         
  | 
    
Returns
| 
        System.Drawing.SizeF
         
  | 
    
ArrangeWithLeftAlignment(SizeF)
Declaration
protected virtual SizeF ArrangeWithLeftAlignment(SizeF finalSize)
  Parameters
| 
        System.Drawing.SizeF
        finalSize
         
  | 
    
Returns
| 
        System.Drawing.SizeF
         
  | 
    
ArrangeWithRightAlignment(SizeF)
Declaration
protected virtual SizeF ArrangeWithRightAlignment(SizeF finalSize)
  Parameters
| 
        System.Drawing.SizeF
        finalSize
         
  | 
    
Returns
| 
        System.Drawing.SizeF
         
  | 
    
BinarySearch(LineInfo, IComparer)
Search a line by using concrete comparer
Declaration
protected virtual ITextBlock BinarySearch(LineInfo line, IComparer comparer)
  Parameters
| 
        LineInfo
        line
         The line.  | 
    
| 
        System.Collections.IComparer
        comparer
         The comparer.  | 
    
Returns
| 
        ITextBlock
         
  | 
    
BinarySearchTextBlockByOffset(LineInfo, Int32)
Search a text block by offset.
Declaration
public ITextBlock BinarySearchTextBlockByOffset(LineInfo line, int offset)
  Parameters
| 
        LineInfo
        line
         The line.  | 
    
| 
        System.Int32
        offset
         The offset.  | 
    
Returns
| 
        ITextBlock
         
  | 
    
BinarySearchTextBlockByXCoordinate(LineInfo, Single)
Search a text block by X coordinate.
Declaration
public ITextBlock BinarySearchTextBlockByXCoordinate(LineInfo line, float x)
  Parameters
| 
        LineInfo
        line
         The line.  | 
    
| 
        System.Single
        x
         The x.  | 
    
Returns
| 
        ITextBlock
         
  | 
    
CanInsert(Char)
Declaration
protected virtual bool CanInsert(char symbol)
  Parameters
| 
        System.Char
        symbol
         
  | 
    
Returns
| 
        System.Boolean
         
  | 
    
CanInsert(String)
Declaration
protected virtual bool CanInsert(string text)
  Parameters
| 
        System.String
        text
         
  | 
    
Returns
| 
        System.Boolean
         
  | 
    
ClampDesiredSize(SizeF, SizeF)
Clamps the desired size in the valid available size bounds.
Declaration
protected virtual SizeF ClampDesiredSize(SizeF desiredSize, SizeF availableSize)
  Parameters
| 
        System.Drawing.SizeF
        desiredSize
         The available size.  | 
    
| 
        System.Drawing.SizeF
        availableSize
         The desired size.  | 
    
Returns
| 
        System.Drawing.SizeF
         
  | 
    
Clear()
Clears the presented text
Declaration
public void Clear()
  ContainsNewLine(String)
Determines whether the text contains a new line
Declaration
public static bool ContainsNewLine(string text)
  Parameters
| 
        System.String
        text
         The text  | 
    
Returns
| 
        System.Boolean
         
  | 
    
ContainsNonLetterOrDigit(String)
Declaration
public static bool ContainsNonLetterOrDigit(string text)
  Parameters
| 
        System.String
        text
         
  | 
    
Returns
| 
        System.Boolean
         
  | 
    
CreateBlock(String, Type)
Creates the block for concrete System.Type and System.String instance.
Declaration
protected virtual ITextBlock CreateBlock(string text, Type type)
  Parameters
| 
        System.String
        text
         The text  | 
    
| 
        System.Type
        type
         The type.  | 
    
Returns
| 
        ITextBlock
         
  | 
    
CreateNewLine(ITextBlock, ref SizeF, ref Int32)
Declaration
protected virtual LineInfo CreateNewLine(ITextBlock block, ref SizeF desiredSize, ref int lineIndex)
  Parameters
| 
        ITextBlock
        block
         
  | 
    
| 
        System.Drawing.SizeF
        desiredSize
         
  | 
    
| 
        System.Int32
        lineIndex
         
  | 
    
Returns
| 
        LineInfo
         
  | 
    
CreateTextBlocks(String)
Declaration
public void CreateTextBlocks(string text)
  Parameters
| 
        System.String
        text
         
  | 
    
CreateTextBlocksOverride(String)
Declaration
protected virtual void CreateTextBlocksOverride(string text)
  Parameters
| 
        System.String
        text
         
  | 
    
GetBaselineOffset(LineInfo, ITextBlock)
Gets the baseline offset.
Declaration
protected virtual float GetBaselineOffset(LineInfo line, ITextBlock textBlock)
  Parameters
| 
        LineInfo
        line
         The line.  | 
    
| 
        ITextBlock
        textBlock
         The text block.  | 
    
Returns
| 
        System.Single
         
  | 
    
GetBlockText(ITextBlock, Int32, Int32)
Gets the block's text.
Declaration
protected virtual string GetBlockText(ITextBlock block, int start, int length)
  Parameters
| 
        ITextBlock
        block
         The block.  | 
    
| 
        System.Int32
        start
         The start.  | 
    
| 
        System.Int32
        length
         The length.  | 
    
Returns
| 
        System.String
         
  | 
    
GetLineInfo(Int32)
Gets the line info by its index
Declaration
protected LineInfo GetLineInfo(int lineIndex)
  Parameters
| 
        System.Int32
        lineIndex
         Index of the line.  | 
    
Returns
| 
        LineInfo
         
  | 
    
GetNextBlock(Int32)
Gets the next block for this index
Declaration
protected ITextBlock GetNextBlock(int index)
  Parameters
| 
        System.Int32
        index
         The index.  | 
    
Returns
| 
        ITextBlock
         
  | 
    
GetPreviousBlock(Int32)
Gets the previous block for this index
Declaration
protected ITextBlock GetPreviousBlock(int index)
  Parameters
| 
        System.Int32
        index
         The index.  | 
    
Returns
| 
        ITextBlock
         
  | 
    
GetTextRange(TextPosition, TextPosition)
Gets the text between start and end position
Declaration
public string GetTextRange(TextPosition startPosition, TextPosition endPosition)
  Parameters
| 
        TextPosition
        startPosition
         The start position.  | 
    
| 
        TextPosition
        endPosition
         The end position.  | 
    
Returns
| 
        System.String
         
  | 
    
HasText()
Determines whether this panel has text.
Declaration
public bool HasText()
  Returns
| 
        System.Boolean
         
  | 
    
InitializeFields()
Declaration
protected override void InitializeFields()
  Overrides
InsertTextBlocks(Int32, String, Type)
Declaration
protected virtual int InsertTextBlocks(int index, string text, Type blockType)
  Parameters
| 
        System.Int32
        index
         
  | 
    
| 
        System.String
        text
         
  | 
    
| 
        System.Type
        blockType
         
  | 
    
Returns
| 
        System.Int32
         
  | 
    
InvalidateLayout()
Performs measurement and arrangement of child elements.
Declaration
protected void InvalidateLayout()
  IsCarriageReturn(String)
Determines whether the text is carriage return symbol.
Declaration
public static bool IsCarriageReturn(string text)
  Parameters
| 
        System.String
        text
         The text.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
IsLineFeed(String)
Determines whether the text is line feed symbol.
Declaration
public static bool IsLineFeed(string text)
  Parameters
| 
        System.String
        text
         The text.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
IsSpecialText(String)
Determines whether the text is tab, whitespace, line feed or carriage return symbol.
Declaration
public static bool IsSpecialText(string text)
  Parameters
| 
        System.String
        text
         The text.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
IsTab(String)
Determines whether the specified text is tab.
Declaration
public static bool IsTab(string text)
  Parameters
| 
        System.String
        text
         The text.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
IsTabOrWhitespace(String)
Determines whether the text is tab or whitespace.
Declaration
public static bool IsTabOrWhitespace(string text)
  Parameters
| 
        System.String
        text
         The text.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
IsWhitespace(String)
Determines whether the specified text is whitespace.
Declaration
public static bool IsWhitespace(string text)
  Parameters
| 
        System.String
        text
         The text.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
  Parameters
| 
        System.Drawing.SizeF
        availableSize
         
  | 
    
Returns
| 
        System.Drawing.SizeF
         
  | 
    
Overrides
MeasureTextBlock(ITextBlock, SizeF)
Declaration
protected void MeasureTextBlock(ITextBlock textBlock, SizeF availableSize)
  Parameters
| 
        ITextBlock
        textBlock
         
  | 
    
| 
        System.Drawing.SizeF
        availableSize
         
  | 
    
MeasureTextBlockOverride(ITextBlock, SizeF)
Declaration
protected virtual void MeasureTextBlockOverride(ITextBlock textBlock, SizeF availableSize)
  Parameters
| 
        ITextBlock
        textBlock
         
  | 
    
| 
        System.Drawing.SizeF
        availableSize
         
  | 
    
MeasureWrap(SizeF, Int32, ref SizeF, ref Int32, ref Int32)
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
| 
        System.Drawing.SizeF
        availableSize
         The available size.  | 
    
| 
        System.Int32
        blockIndex
         Index of the current block.  | 
    
| 
        System.Drawing.SizeF
        desiredSize
         Document desired size.  | 
    
| 
        System.Int32
        currentLineIndex
         Index of the current line.  | 
    
| 
        System.Int32
        offset
         The current block offset.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
MergeAndMeasureBlock(ITextBlock, SizeF)
Merge and measure block.
Declaration
protected virtual void MergeAndMeasureBlock(ITextBlock textBlock, SizeF availableSize)
  Parameters
| 
        ITextBlock
        textBlock
         The text block.  | 
    
| 
        System.Drawing.SizeF
        availableSize
         The available size.  | 
    
NotifyCreateTextBlock(ITextBlock, String)
Declaration
protected ITextBlock NotifyCreateTextBlock(ITextBlock block, string text)
  Parameters
| 
        ITextBlock
        block
         
  | 
    
| 
        System.String
        text
         
  | 
    
Returns
| 
        ITextBlock
         
  | 
    
NotifyTextChanged(String, Int32, TextBoxChangeAction)
Notifies the text changed.
Declaration
protected virtual void NotifyTextChanged(string text, int caretPosition, TextBoxChangeAction action)
  Parameters
| 
        System.String
        text
         The text.  | 
    
| 
        System.Int32
        caretPosition
         The caret position.  | 
    
| 
        TextBoxChangeAction
        action
         The action.  | 
    
NotifyTextChanging(Int32, Int32, String, String, TextBoxChangeAction)
Notifies the text changing.
Declaration
protected virtual bool NotifyTextChanging(int startPosition, int length, string oldText, string newText, TextBoxChangeAction action)
  Parameters
| 
        System.Int32
        startPosition
         The start position.  | 
    
| 
        System.Int32
        length
         The length.  | 
    
| 
        System.String
        oldText
         The old text.  | 
    
| 
        System.String
        newText
         The new text.  | 
    
| 
        TextBoxChangeAction
        action
         The action.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
OnCreateTextBlock(CreateTextBlockEventArgs)
Raises the CreateTextBlock event.
Declaration
protected virtual void OnCreateTextBlock(CreateTextBlockEventArgs e)
  Parameters
| 
        CreateTextBlockEventArgs
        e
         The CreateTextBlockEventArgs instance containing the event data.  | 
    
OnPropertyChanging(String, Object, Object)
Called when a property is changing.
Declaration
protected bool OnPropertyChanging(string propertyName, object oldValue, object newValue)
  Parameters
| 
        System.String
        propertyName
         Name of the property.  | 
    
| 
        System.Object
        oldValue
         The old value.  | 
    
| 
        System.Object
        newValue
         The new value.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
OnPropertyChanging(PropertyChangingEventArgsEx)
Raises the PropertyChanging event.
Declaration
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
  Parameters
| 
        PropertyChangingEventArgsEx
        e
         The System.ComponentModel.PropertyChangingEventArgs instance containing the event data.  | 
    
OnTextBlockFormatting(ITextBlock)
Called when text block is formatting.
Declaration
protected void OnTextBlockFormatting(ITextBlock textBlock)
  Parameters
| 
        ITextBlock
        textBlock
         The text block.  | 
    
OnTextBlockFormatting(TextBlockFormattingEventArgs)
Raises the TextBlockFormatting event.
Declaration
protected virtual void OnTextBlockFormatting(TextBlockFormattingEventArgs e)
  Parameters
| 
        TextBlockFormattingEventArgs
        e
         The TextBlockFormattingEventArgs instance containing the event data.  | 
    
OnTextChanged(EventArgs)
Declaration
protected override void OnTextChanged(EventArgs e)
  Parameters
| 
        System.EventArgs
        e
         
  | 
    
Overrides
PaintText(IGraphics)
Declaration
protected override void PaintText(IGraphics graphics)
  Parameters
| 
        IGraphics
        graphics
         
  | 
    
Overrides
SplitBlock(LineInfo, SizeF, ref ITextBlock, ref Int32)
Declaration
protected virtual bool SplitBlock(LineInfo currentLine, SizeF availableSize, ref ITextBlock textBlock, ref int offset)
  Parameters
| 
        LineInfo
        currentLine
         
  | 
    
| 
        System.Drawing.SizeF
        availableSize
         
  | 
    
| 
        ITextBlock
        textBlock
         
  | 
    
| 
        System.Int32
        offset
         
  | 
    
Returns
| 
        System.Boolean
         
  | 
    
ToggleTextPrimitive(RadProperty)
Declaration
protected override void ToggleTextPrimitive(RadProperty property)
  Parameters
| 
        RadProperty
        property
         
  | 
    
Overrides
Events
CreateTextBlock
Occurs when an instance of ITextBlock is created
Declaration
public event CreateTextBlockEventHandler CreateTextBlock
  Event Type
| 
        CreateTextBlockEventHandler
         
  | 
    
PropertyChanging
Occurs when a property value is changing.
Declaration
public event PropertyChangingEventHandlerEx PropertyChanging
  Event Type
| 
        PropertyChangingEventHandlerEx
         
  | 
    
Implements
TextBlockFormatting
Occurs when text block is formatting.
Declaration
public event TextBlockFormattingEventHandler TextBlockFormatting
  Event Type
| 
        TextBlockFormattingEventHandler
         
  |