Class CellRange
The CellRange class represents a rectangular grid cell range
Inherited Members
Namespace: Maze.Maui.Controls.InteractiveGrid
Assembly: Maze.Maui.Controls.dll
Syntax
public class CellRange
Constructors
CellRange(CellPoint)
Constructor (point)
Declaration
public CellRange(CellPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| CellPoint | point | Point |
CellRange(int, int)
Constructor (single cell)
Declaration
public CellRange(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | Row number |
| int | column | Column number |
CellRange(int, int, int, int)
Constructor (range)
Declaration
public CellRange(int top, int left, int bottom, int right)
Parameters
| Type | Name | Description |
|---|---|---|
| int | top | Top row number |
| int | left | Left column number |
| int | bottom | Bottom row number |
| int | right | Right column number |
Properties
Bottom
The bottom row number associated with the range
Declaration
public int Bottom { get; set; }
Property Value
| Type | Description |
|---|---|
| int | Bottom row number |
CellCount
The number of cells in the range (Width * Height)
Declaration
public int CellCount { get; }
Property Value
| Type | Description |
|---|---|
| int | Number of cells |
Height
The height of the range (Bottom - Top + 1)
Declaration
public int Height { get; }
Property Value
| Type | Description |
|---|---|
| int | Height |
IsSingleCell
Indicates whether the the range corresponds to a single cell
Declaration
public bool IsSingleCell { get; }
Property Value
| Type | Description |
|---|---|
| bool | Boolean |
Left
The left column number associated with the range
Declaration
public int Left { get; set; }
Property Value
| Type | Description |
|---|---|
| int | Left column number |
Right
The right column number associated with the range
Declaration
public int Right { get; set; }
Property Value
| Type | Description |
|---|---|
| int | Right column number |
Top
The top row number associated with the range
Declaration
public int Top { get; set; }
Property Value
| Type | Description |
|---|---|
| int | Top row number |
Width
The width of the range (Right - Left + 1)
Declaration
public int Width { get; }
Property Value
| Type | Description |
|---|---|
| int | Width |
Methods
ClampColumns(int)
Restricts the columns associated with the object so that they do not exceed a given maximum column number
Declaration
public void ClampColumns(int maxColumn)
Parameters
| Type | Name | Description |
|---|---|---|
| int | maxColumn | Maximum column number |
ClampRows(int)
Restricts the rows associated with the object so that they do not exceed a given maximum row number
Declaration
public void ClampRows(int maxRow)
Parameters
| Type | Name | Description |
|---|---|---|
| int | maxRow | Maximum row number |
Clone()
Creates a copy of the object
Declaration
public CellRange Clone()
Returns
| Type | Description |
|---|---|
| CellRange | Copy of the object |
ContainsColumn(int)
Checks whether the range includes a given column
Declaration
public bool ContainsColumn(int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | column | Column to check |
Returns
| Type | Description |
|---|---|
| bool | Boolean |
ContainsPoint(CellPoint)
Checks whether the range includes a given point
Declaration
public bool ContainsPoint(CellPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| CellPoint | point | Point to check |
Returns
| Type | Description |
|---|---|
| bool | Boolean |
ContainsPosition(int, int)
Checks whether the range includes a given row and column
Declaration
public bool ContainsPosition(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | Row to check |
| int | column | Column to check |
Returns
| Type | Description |
|---|---|
| bool | Boolean |
ContainsRow(int)
Checks whether the range includes a given row
Declaration
public bool ContainsRow(int row)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | Row to check |
Returns
| Type | Description |
|---|---|
| bool | Boolean |
Equals(CellRange?)
Checks whether the range matches a comparison range
Declaration
public bool Equals(CellRange? compare)
Parameters
| Type | Name | Description |
|---|---|---|
| CellRange | compare | Comparison range |
Returns
| Type | Description |
|---|---|
| bool | Boolean |