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

Defines the positioned rectangular bounds of a cell for rendering and hit-testing operations.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Layout

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class CellLayoutBox : LayoutBox

Inheritance: objectLayoutBoxCellLayoutBox

Inherited Members LayoutBox.LeftLayoutBox.TopLayoutBox.WidthLayoutBox.HeightLayoutBox.SizeLayoutBox.BoundingRectangle...

Constructors

Initializes a new instance of the CellLayoutBox class.

C#
public CellLayoutBox(int rowIndex, int columnIndex, Rect rect, CellMergeState mergeState)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

rectRect

The rectangle.

mergeStateCellMergeState

The merge.

Properties

Zero-based column position of this cell in the worksheet grid.

C#
public int ColumnIndex { get; }
Property Value:

The index of the column.

Combined row and column coordinates identifying this cell's position in the worksheet.

C#
public CellIndex Index { get; }
Property Value:

The index.

Indicates whether this cell is merged and its role within the merged region (top-left, other, or not merged).

C#
public CellMergeState MergeState { get; }
Property Value:

The merge state of the cell.

Zero-based row position of this cell in the worksheet grid.

C#
public int RowIndex { get; }
Property Value:

The index of the row.

Methods

Compares this cell layout box with another based on cell position (row and column index).

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

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Generates a hash code based on the cell's combined row and column index.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Converts the cell position to a string representation in the format "(row, column)".

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: LayoutBox.ToString()