Class
LayoutHelper

Provides utility methods for calculating cell content sizes, column widths, and layout boxes within a worksheet.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Layout

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public static class LayoutHelper

Inheritance: objectLayoutHelper

Methods

CalculateCellContentSize(Worksheet, CellIndex)

Calculates the size required to render the content of the specified cell, accounting for text wrapping and formatting.

Declaration

cs-api-definition
public static Size CalculateCellContentSize(Worksheet worksheet, CellIndex cellIndex)

Parameters

worksheet

Worksheet

The worksheet.

cellIndex

CellIndex

Index of the cell.

Returns

Size

The size of the cell content.

CalculateCellContentSize(Worksheet, int, int)

Calculates the size required to render the content of the cell at the specified row and column, accounting for text wrapping and formatting.

Declaration

cs-api-definition
public static Size CalculateCellContentSize(Worksheet worksheet, int rowIndex, int columnIndex)

Parameters

worksheet

Worksheet

The worksheet.

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

Returns

Size

The size of the cell content.

CalculateCellLayoutBox(Worksheet, CellIndex)

Calculates the positioned layout box for the specified cell, handling merged cell regions when present.

Declaration

cs-api-definition
public static CellLayoutBox CalculateCellLayoutBox(Worksheet worksheet, CellIndex cellIndex)

Parameters

worksheet

Worksheet

The worksheet.

cellIndex

CellIndex

Index of the cell.

Returns

CellLayoutBox

The cell layout box.

CalculateCellLayoutBox(Worksheet, int, int)

Calculates the positioned layout box for the cell at the specified row and column, handling merged cell regions when present.

Declaration

cs-api-definition
public static CellLayoutBox CalculateCellLayoutBox(Worksheet worksheet, int rowIndex, int columnIndex)

Parameters

worksheet

Worksheet

The worksheet.

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

Returns

CellLayoutBox

The cell layout box.