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

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:

C#
public class SheetViewport

Inheritance: objectSheetViewport

Properties

Gets the total visible height across all viewport panes.

C#
public double Height { get; }
Property Value:

The height.

Gets or sets the ViewportPane of the specified type.

C#
public ViewportPane this[ViewportPaneType pane] { get; set; }
Parameters:paneViewportPaneTypeProperty Value:

The viewport pane.

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

C#
public ViewportPane[] ViewportPanes { get; }
Property Value:

The viewport panes.

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

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

The viewport panes count.

Gets the total visible width across all viewport panes.

C#
public double Width { get; }
Property Value:

The width.

Methods

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

C#
public bool Contains(CellIndex cellIndex)
Parameters:cellIndexCellIndex

Index of the cell.

Returns:

bool

True if contains the cell index.

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

C#
public bool Contains(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

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

C#
public bool Contains(Point point)
Parameters:pointPoint

The point.

Returns:

bool

True if contains the point.

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

C#
public bool Contains(Rect boundingRectangle)
Parameters:boundingRectangleRect

The bounding rectangle.

Returns:

bool

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

C#
public bool ContainsColumnIndex(int columnIndex)
Parameters:columnIndexint

Index of the column.

Returns:

bool

True if contains the column index.

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

C#
public bool ContainsRowIndex(int rowIndex)
Parameters:rowIndexint

Index of the row.

Returns:

bool

True if contains the row index.

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

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)

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

C#
public CellRange GetCellRangeContainingCellIndex(CellIndex cellIndex)
Parameters:cellIndexCellIndex

Index of the cell.

Returns:

CellRange

The cell range.

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

C#
public CellRange GetCellRangeContainingCellIndex(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

CellRange

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

C#
public Point GetDocumentPointFromViewPoint(Point point)
Parameters:pointPoint

The view point point.

Returns:

Point

The document point.

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

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

C#
public ViewportPane GetLeftMostViewportPaneContainingRowIndex(int rowIndex)
Parameters:rowIndexint

Index of the row.

Returns:

ViewportPane

The viewport pane containing row index.

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

C#
public Point GetTopLeftPoint()
Returns:

Point

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

C#
public ViewportPane GetTopMostViewportPaneContainingColumnIndex(int columnIndex)
Parameters:columnIndexint

Index of the column.

Returns:

ViewportPane

The viewport pane containing column index.

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

C#
public Point GetViewPointFromDocumentPoint(Point point)
Parameters:pointPoint

The document point.

Returns:

Point

The view point.

Gets the viewport pane that contains the specified cell index.

C#
public ViewportPane GetViewportPaneContainingCellIndex(CellIndex index)
Parameters:indexCellIndex

The index.

Returns:

ViewportPane

The viewport pane containing cell.

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

C#
public ViewportPane GetViewportPaneFromDocumentPoint(Point point)
Parameters:pointPoint

The document point.

Returns:

ViewportPane

The viewport pane.

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

C#
public Point Translate(Point point, ViewportPaneType pointContainingPaneType)
Parameters:pointPoint

The point.

pointContainingPaneTypeViewportPaneType

Type of the pane that contains the point.

Returns:

Point

The translated point.

Operators

Implements the less operator.

C#
public static bool operator !=(SheetViewport first, SheetViewport second)
Parameters:firstSheetViewport

The first value.

secondSheetViewport

The second value.

Returns:

bool

The result of the operator.

Implements the equals operator.

C#
public static bool operator ==(SheetViewport first, SheetViewport second)
Parameters:firstSheetViewport

The first value.

secondSheetViewport

The second value.

Returns:

bool

The result of the operator.