TextPosition
Represent a text position in RadTextBoxControlElement
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TextPosition : IComparable<TextPosition>, IEquatable<TextPosition>
Inheritance: objectTextPosition
Implements:
Constructors
Initializes a new instance of the TextPosition class.
public TextPosition(LineInfo line, ITextBlock textBlock, int charPosition)
The line.
textBlockITextBlockThe text block.
charPositionintThe char position.
Properties
Gets the char position in ITextBlock
public int CharPosition { get; }
Gets the text block.
public ITextBlock TextBlock { get; }
Methods
Compares to TextPosition
public virtual int CompareTo(TextPosition position)
The position.
Returns:Implements:
Equalses the specified position.
public virtual bool Equals(TextPosition position)
The position.
Returns:Implements:
Gets the first position.
public static TextPosition GetFirstPosition(TextBoxWrapPanel layoutPanel)
The layout panel.
Returns:Returns a hash code for this instance.
public override int GetHashCode()
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides:
Gets the last position.
public static TextPosition GetLastPosition(TextBoxWrapPanel layoutPanel)
The layout panel.
Returns:Gets the length.
public static int GetLength(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:Swaps two positions
public static void Swap(ref TextPosition startPosition, ref TextPosition endPosition)
The start position.
endPositionTextPositionThe end position.
Operators
Performs an implicit conversion from TextPosition to int.
public static implicit operator int(TextPosition start)
The start.
Returns:The result of the conversion.
Implements the operator !=.
public static bool operator !=(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:The result of the operator.
Implements the operator <.
public static bool operator <(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:The result of the operator.
Implements the operator <=.
public static bool operator <=(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:The result of the operator.
Implements the operator ==.
public static bool operator ==(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:The result of the operator.
Implements the operator >.
public static bool operator >(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:The result of the operator.
Implements the operator >=.
public static bool operator >=(TextPosition start, TextPosition end)
The start.
endTextPositionThe end.
Returns:The result of the operator.