New to Telerik UI for WinFormsStart a free 30-day trial

Represent a text position in RadTextBoxControlElement

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class TextPosition : IComparable<TextPosition>, IEquatable<TextPosition>

Inheritance: objectTextPosition

Implements: IComparable<TextPosition>IEquatable<TextPosition>

Constructors

Initializes a new instance of the TextPosition class.

C#
public TextPosition(LineInfo line, ITextBlock textBlock, int charPosition)
Parameters:lineLineInfo

The line.

textBlockITextBlock

The text block.

charPositionint

The char position.

Properties

Gets the char position in ITextBlock

C#
public int CharPosition { get; }

Gets the line.

C#
public LineInfo Line { get; }

Gets the text block.

C#
public ITextBlock TextBlock { get; }

Methods

Compares to TextPosition

C#
public virtual int CompareTo(TextPosition position)
Parameters:positionTextPosition

The position.

Returns:

int

Implements: IComparable<TextPosition>.CompareTo(TextPosition)

Determines whether the specified object is equal to this instance.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this instance.

Returns:

bool

true if the specified object is equal to this instance; otherwise, false.

Overrides: object.Equals(object)

Equalses the specified position.

C#
public virtual bool Equals(TextPosition position)
Parameters:positionTextPosition

The position.

Returns:

bool

Implements: IEquatable<TextPosition>.Equals(TextPosition)

Gets the first position.

C#
public static TextPosition GetFirstPosition(TextBoxWrapPanel layoutPanel)
Parameters:layoutPanelTextBoxWrapPanel

The layout panel.

Returns:

TextPosition

Returns a hash code for this instance.

C#
public override int GetHashCode()
Returns:

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides: object.GetHashCode()

Gets the last position.

C#
public static TextPosition GetLastPosition(TextBoxWrapPanel layoutPanel)
Parameters:layoutPanelTextBoxWrapPanel

The layout panel.

Returns:

TextPosition

Gets the length.

C#
public static int GetLength(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

int

Swaps two positions

C#
public static void Swap(ref TextPosition startPosition, ref TextPosition endPosition)
Parameters:startPositionTextPosition

The start position.

endPositionTextPosition

The end position.

C#
public override string ToString()
Returns:

string

Overrides: object.ToString()

Operators

Performs an implicit conversion from TextPosition to int.

C#
public static implicit operator int(TextPosition start)
Parameters:startTextPosition

The start.

Returns:

int

The result of the conversion.

Implements the operator !=.

C#
public static bool operator !=(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

bool

The result of the operator.

Implements the operator <.

C#
public static bool operator <(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

bool

The result of the operator.

Implements the operator <=.

C#
public static bool operator <=(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

bool

The result of the operator.

Implements the operator ==.

C#
public static bool operator ==(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

bool

The result of the operator.

Implements the operator >.

C#
public static bool operator >(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

bool

The result of the operator.

Implements the operator >=.

C#
public static bool operator >=(TextPosition start, TextPosition end)
Parameters:startTextPosition

The start.

endTextPosition

The end.

Returns:

bool

The result of the operator.