Class SheetViewport
Manages the visible area and frozen panes of a worksheet, translating between document coordinates and view coordinates.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Layout
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class SheetViewport
Properties
Height
Gets the total visible height across all viewport panes.
Declaration
public double Height { get; }
Property Value
|
System.Double
The height. |
Item[ViewportPaneType]
Gets or sets the ViewportPane of the specified type.
Declaration
public ViewportPane this[ViewportPaneType pane] { get; set; }
Parameters
|
ViewportPaneType
pane
|
Property Value
|
ViewportPane
The viewport pane. |
ViewportPanes
Gets the array of non-empty viewport panes created by frozen rows or columns.
Declaration
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
public int ViewportPanesCount { get; }
Property Value
|
System.Int32
The viewport panes count. |
Width
Gets the total visible width across all viewport panes.
Declaration
public double Width { get; }
Property Value
|
System.Double
The width. |
Methods
Contains(Int32, Int32)
Determines whether the viewport contains the cell at the specified row and column index in any visible range.
Declaration
public bool Contains(int rowIndex, int columnIndex)
Parameters
|
System.Int32
rowIndex
Index of the row. |
|
System.Int32
columnIndex
Index of the column. |
Returns
|
System.Boolean
|
Contains(Point)
Determines whether the viewport contains the specified point within any pane.
Declaration
public bool Contains(Point point)
Parameters
|
System.Windows.Point
point
The point. |
Returns
|
System.Boolean
True if contains the point. |
Contains(Rect)
Determines whether the viewport contains the specified bounding rectangle within any pane.
Declaration
public bool Contains(Rect boundingRectangle)
Parameters
|
System.Windows.Rect
boundingRectangle
The bounding rectangle. |
Returns
|
System.Boolean
|
Contains(CellIndex)
Determines whether the viewport contains the specified cell index in any visible range.
Declaration
public bool Contains(CellIndex cellIndex)
Parameters
|
CellIndex
cellIndex
Index of the cell. |
Returns
|
System.Boolean
True if contains the cell index. |
ContainsColumnIndex(Int32)
Determines whether the viewport contains the specified column index in any visible range.
Declaration
public bool ContainsColumnIndex(int columnIndex)
Parameters
|
System.Int32
columnIndex
Index of the column. |
Returns
|
System.Boolean
True if contains the column index. |
ContainsRowIndex(Int32)
Determines whether the viewport contains the specified row index in any visible range.
Declaration
public bool ContainsRowIndex(int rowIndex)
Parameters
|
System.Int32
rowIndex
Index of the row. |
Returns
|
System.Boolean
True if contains the row index. |
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
Declaration
public override bool Equals(object obj)
Parameters
|
System.Object
obj
The object to compare with the current object. |
Returns
|
System.Boolean
True if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
GetCellRangeContainingCellIndex(Int32, Int32)
Gets the visible range of the viewport pane that contains the cell at the specified row and column.
Declaration
public CellRange GetCellRangeContainingCellIndex(int rowIndex, int columnIndex)
Parameters
|
System.Int32
rowIndex
Index of the row. |
|
System.Int32
columnIndex
Index of the column. |
Returns
|
CellRange
|
GetCellRangeContainingCellIndex(CellIndex)
Gets the visible range of the viewport pane that contains the specified cell index.
Declaration
public CellRange GetCellRangeContainingCellIndex(CellIndex cellIndex)
Parameters
|
CellIndex
cellIndex
Index of the cell. |
Returns
|
CellRange
The cell range. |
GetDocumentPointFromViewPoint(Point)
Converts a point from view coordinates to document coordinates, accounting for frozen panes and scaling.
Declaration
public Point GetDocumentPointFromViewPoint(Point point)
Parameters
|
System.Windows.Point
point
The view point point. |
Returns
|
System.Windows.Point
The document point. |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
|
System.Int32
A hash code for the current System.Object. |
Overrides
GetLeftMostViewportPaneContainingRowIndex(Int32)
Gets the leftmost viewport pane that contains the specified row index.
Declaration
public ViewportPane GetLeftMostViewportPaneContainingRowIndex(int rowIndex)
Parameters
|
System.Int32
rowIndex
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
public Point GetTopLeftPoint()
Returns
|
System.Windows.Point
|
GetTopMostViewportPaneContainingColumnIndex(Int32)
Gets the topmost viewport pane that contains the specified column index.
Declaration
public ViewportPane GetTopMostViewportPaneContainingColumnIndex(int columnIndex)
Parameters
|
System.Int32
columnIndex
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
public Point GetViewPointFromDocumentPoint(Point point)
Parameters
|
System.Windows.Point
point
The document point. |
Returns
|
System.Windows.Point
The view point. |
GetViewportPaneContainingCellIndex(CellIndex)
Gets the viewport pane that contains the specified cell index.
Declaration
public ViewportPane GetViewportPaneContainingCellIndex(CellIndex index)
Parameters
|
CellIndex
index
The index. |
Returns
|
ViewportPane
The viewport pane containing cell. |
GetViewportPaneFromDocumentPoint(Point)
Determines which viewport pane contains the specified point in document coordinates.
Declaration
public ViewportPane GetViewportPaneFromDocumentPoint(Point point)
Parameters
|
System.Windows.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
public Point Translate(Point point, ViewportPaneType pointContainingPaneType)
Parameters
|
System.Windows.Point
point
The point. |
|
ViewportPaneType
pointContainingPaneType
Type of the pane that contains the point. |
Returns
|
System.Windows.Point
The translated point. |
Operators
Equality(SheetViewport, SheetViewport)
Implements the equals operator.
Declaration
public static bool operator ==(SheetViewport first, SheetViewport second)
Parameters
|
SheetViewport
first
The first value. |
|
SheetViewport
second
The second value. |
Returns
|
System.Boolean
The result of the operator. |
Inequality(SheetViewport, SheetViewport)
Implements the less operator.
Declaration
public static bool operator !=(SheetViewport first, SheetViewport second)
Parameters
|
SheetViewport
first
The first value. |
|
SheetViewport
second
The second value. |
Returns
|
System.Boolean
The result of the operator. |