Class
SheetViewport

Manages the visible area and frozen panes of a worksheet, translating between document coordinates and view coordinates.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Layout

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class SheetViewport

Inheritance: objectSheetViewport

Properties

Height

Gets the total visible height across all viewport panes.

Declaration

cs-api-definition
public double Height { get; }

Property Value

double

The height.

ViewportPanes

Gets the array of non-empty viewport panes created by frozen rows or columns.

Declaration

cs-api-definition
public ViewportPane[] ViewportPanes { get; }

Property Value

ViewportPane[]

The viewport panes.

ViewportPanesCount

Gets the count of non-empty viewport panes created by frozen rows or columns.

Declaration

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

Property Value

int

The viewport panes count.

Width

Gets the total visible width across all viewport panes.

Declaration

cs-api-definition
public double Width { get; }

Property Value

double

The width.

this[ViewportPaneType]

Gets or sets the ViewportPane of the specified type.

Declaration

cs-api-definition
public ViewportPane this[ViewportPaneType pane] { get; set; }

Parameters

pane

ViewportPaneType

Property Value

ViewportPane

The viewport pane.

Methods

Contains(CellIndex)

Determines whether the viewport contains the specified cell index in any visible range.

Declaration

cs-api-definition
public bool Contains(CellIndex cellIndex)

Parameters

cellIndex

CellIndex

Index of the cell.

Returns

bool

True if contains the cell index.

Contains(Point)

Determines whether the viewport contains the specified point within any pane.

Declaration

cs-api-definition
public bool Contains(Point point)

Parameters

point

Point

The point.

Returns

bool

True if contains the point.

Contains(Rect)

Determines whether the viewport contains the specified bounding rectangle within any pane.

Declaration

cs-api-definition
public bool Contains(Rect boundingRectangle)

Parameters

boundingRectangle

Rect

The bounding rectangle.

Returns

bool

Contains(int, int)

Determines whether the viewport contains the cell at the specified row and column index in any visible range.

Declaration

cs-api-definition
public bool Contains(int rowIndex, int columnIndex)

Parameters

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

Returns

bool

ContainsColumnIndex(int)

Determines whether the viewport contains the specified column index in any visible range.

Declaration

cs-api-definition
public bool ContainsColumnIndex(int columnIndex)

Parameters

columnIndex

int

Index of the column.

Returns

bool

True if contains the column index.

ContainsRowIndex(int)

Determines whether the viewport contains the specified row index in any visible range.

Declaration

cs-api-definition
public bool ContainsRowIndex(int rowIndex)

Parameters

rowIndex

int

Index of the row.

Returns

bool

True if contains the row index.

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration

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

Parameters

obj

object

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)

GetCellRangeContainingCellIndex(CellIndex)

Gets the visible range of the viewport pane that contains the specified cell index.

Declaration

cs-api-definition
public CellRange GetCellRangeContainingCellIndex(CellIndex cellIndex)

Parameters

cellIndex

CellIndex

Index of the cell.

Returns

CellRange

The cell range.

GetCellRangeContainingCellIndex(int, int)

Gets the visible range of the viewport pane that contains the cell at the specified row and column.

Declaration

cs-api-definition
public CellRange GetCellRangeContainingCellIndex(int rowIndex, int columnIndex)

Parameters

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

Returns

CellRange

GetDocumentPointFromViewPoint(Point)

Converts a point from view coordinates to document coordinates, accounting for frozen panes and scaling.

Declaration

cs-api-definition
public Point GetDocumentPointFromViewPoint(Point point)

Parameters

point

Point

The view point point.

Returns

Point

The document point.

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

GetLeftMostViewportPaneContainingRowIndex(int)

Gets the leftmost viewport pane that contains the specified row index.

Declaration

cs-api-definition
public ViewportPane GetLeftMostViewportPaneContainingRowIndex(int rowIndex)

Parameters

rowIndex

int

Index of the row.

Returns

ViewportPane

The viewport pane containing row index.

GetTopLeftPoint()

Gets the top-left corner point of the first non-empty viewport pane.

Declaration

cs-api-definition
public Point GetTopLeftPoint()

Returns

Point

GetTopMostViewportPaneContainingColumnIndex(int)

Gets the topmost viewport pane that contains the specified column index.

Declaration

cs-api-definition
public ViewportPane GetTopMostViewportPaneContainingColumnIndex(int columnIndex)

Parameters

columnIndex

int

Index of the column.

Returns

ViewportPane

The viewport pane containing column index.

GetViewPointFromDocumentPoint(Point)

Converts a point from document coordinates to view coordinates, accounting for frozen panes and scaling.

Declaration

cs-api-definition
public Point GetViewPointFromDocumentPoint(Point point)

Parameters

point

Point

The document point.

Returns

Point

The view point.

GetViewportPaneContainingCellIndex(CellIndex)

Gets the viewport pane that contains the specified cell index.

Declaration

cs-api-definition
public ViewportPane GetViewportPaneContainingCellIndex(CellIndex index)

Parameters

index

CellIndex

The index.

Returns

ViewportPane

The viewport pane containing cell.

GetViewportPaneFromDocumentPoint(Point)

Determines which viewport pane contains the specified point in document coordinates.

Declaration

cs-api-definition
public ViewportPane GetViewportPaneFromDocumentPoint(Point point)

Parameters

point

Point

The document point.

Returns

ViewportPane

The viewport pane.

Translate(Point, ViewportPaneType)

Translates the specified point to viewport coordinates relative to the containing pane.

Declaration

cs-api-definition
public Point Translate(Point point, ViewportPaneType pointContainingPaneType)

Parameters

point

Point

The point.

pointContainingPaneType

ViewportPaneType

Type of the pane that contains the point.

Returns

Point

The translated point.

Operators

operator !=(SheetViewport, SheetViewport)

Implements the less operator.

Declaration

cs-api-definition
public static bool operator !=(SheetViewport first, SheetViewport second)

Parameters

first

SheetViewport

The first value.

second

SheetViewport

The second value.

Returns

bool

The result of the operator.

operator ==(SheetViewport, SheetViewport)

Implements the equals operator.

Declaration

cs-api-definition
public static bool operator ==(SheetViewport first, SheetViewport second)

Parameters

first

SheetViewport

The first value.

second

SheetViewport

The second value.

Returns

bool

The result of the operator.