Class
TextPosition

Represent a text position in RadTextBoxControlElement

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public class TextPosition : IComparable<TextPosition>, IEquatable<TextPosition>

Inheritance: objectTextPosition

Implements: IComparable<TextPosition>IEquatable<TextPosition>

Constructors

TextPosition(LineInfo, ITextBlock, int)

Initializes a new instance of the TextPosition class.

Declaration

cs-api-definition
public TextPosition(LineInfo line, ITextBlock textBlock, int charPosition)

Parameters

line

LineInfo

The line.

textBlock

ITextBlock

The text block.

charPosition

int

The char position.

Properties

CharPosition

Gets the char position in ITextBlock

Declaration

cs-api-definition
public int CharPosition { get; }

Property Value

int

Line

Gets the line.

Declaration

cs-api-definition
public LineInfo Line { get; }

Property Value

LineInfo

TextBlock

Gets the text block.

Declaration

cs-api-definition
public ITextBlock TextBlock { get; }

Property Value

ITextBlock

Methods

CompareTo(TextPosition)

Compares to TextPosition

Declaration

cs-api-definition
public virtual int CompareTo(TextPosition position)

Parameters

position

TextPosition

The position.

Returns

int

Implements IComparable<TextPosition>.CompareTo(TextPosition)

Equals(TextPosition)

Equalses the specified position.

Declaration

cs-api-definition
public virtual bool Equals(TextPosition position)

Parameters

position

TextPosition

The position.

Returns

bool

Implements IEquatable<TextPosition>.Equals(TextPosition)

Equals(object)

Determines whether the specified object is equal to this instance.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

GetFirstPosition(TextBoxWrapPanel)

Gets the first position.

Declaration

cs-api-definition
public static TextPosition GetFirstPosition(TextBoxWrapPanel layoutPanel)

Parameters

layoutPanel

TextBoxWrapPanel

The layout panel.

Returns

TextPosition

GetHashCode()

Returns a hash code for this instance.

Declaration

cs-api-definition
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()

GetLastPosition(TextBoxWrapPanel)

Gets the last position.

Declaration

cs-api-definition
public static TextPosition GetLastPosition(TextBoxWrapPanel layoutPanel)

Parameters

layoutPanel

TextBoxWrapPanel

The layout panel.

Returns

TextPosition

GetLength(TextPosition, TextPosition)

Gets the length.

Declaration

cs-api-definition
public static int GetLength(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

int

Swap(ref TextPosition, ref TextPosition)

Swaps two positions

Declaration

cs-api-definition
public static void Swap(ref TextPosition startPosition, ref TextPosition endPosition)

Parameters

startPosition

TextPosition

The start position.

endPosition

TextPosition

The end position.

ToString()

Declaration

cs-api-definition
public override string ToString()

Returns

string

Overrides object.ToString()

Operators

implicit operator int(TextPosition)

Performs an implicit conversion from TextPosition to int.

Declaration

cs-api-definition
public static implicit operator int(TextPosition start)

Parameters

start

TextPosition

The start.

Returns

int

The result of the conversion.

operator !=(TextPosition, TextPosition)

Implements the operator !=.

Declaration

cs-api-definition
public static bool operator !=(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

bool

The result of the operator.

operator <(TextPosition, TextPosition)

Implements the operator <.

Declaration

cs-api-definition
public static bool operator <(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

bool

The result of the operator.

operator <=(TextPosition, TextPosition)

Implements the operator <=.

Declaration

cs-api-definition
public static bool operator <=(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

bool

The result of the operator.

operator ==(TextPosition, TextPosition)

Implements the operator ==.

Declaration

cs-api-definition
public static bool operator ==(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

bool

The result of the operator.

operator >(TextPosition, TextPosition)

Implements the operator >.

Declaration

cs-api-definition
public static bool operator >(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

bool

The result of the operator.

operator >=(TextPosition, TextPosition)

Implements the operator >=.

Declaration

cs-api-definition
public static bool operator >=(TextPosition start, TextPosition end)

Parameters

start

TextPosition

The start.

end

TextPosition

The end.

Returns

bool

The result of the operator.