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

Represents the index of a position in a RadDocument.

Definition

Namespace:Telerik.WinForms.Documents

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class HierarchicalIndex : IComparable<HierarchicalIndex>

Inheritance: objectHierarchicalIndex

Implements: IComparable<HierarchicalIndex>

Constructors

Initializes a new instance of the HierarchicalIndex class.

C#
public HierarchicalIndex(int[] indexArray, int positionInInline = 0)
Parameters:indexArrayint[]

The index array.

positionInInlineint

The position in inline.

Methods

Compares the current object with another object of the same type.

C#
public int CompareTo(HierarchicalIndex other)
Parameters:otherHierarchicalIndex

An object to compare with this object.

Returns:

int

A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.

Implements: IComparable<HierarchicalIndex>.CompareTo(HierarchicalIndex)

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)

Gets a layout box by its hierarchical index.

C#
public static LayoutBox GetBoxByHierarchicalIndex(DocumentLayoutBox documentBox, HierarchicalIndex hierarchicalIndex)
Parameters:documentBoxDocumentLayoutBox

The layout box of the parent document.

hierarchicalIndexHierarchicalIndex

The hierarchical index of the layout box.

Returns:

LayoutBox

The layout box.

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 hierarchical index for a layout box.

C#
public static HierarchicalIndex GetHierarchicalIndexByBox(LayoutBox currentBox, int indexInInline = 0)
Parameters:currentBoxLayoutBox

A layout box.

indexInInlineint

Optional index in case the box is InlineLayoutBox.

Returns:

HierarchicalIndex

The hierarchical index.

Gets an integer array representing the hierarchical index.

C#
public int[] GetIndexArray()
Returns:

int[]

An integer array representing the hierarchical index.

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: object.ToString()

Extension Methods