FREE TRIAL

|

☀
☾
struct

GridList<T>

A read-only utility wrapper around an System.Collections.Generic.IList<T> (see Source) to simplify indexing into the list by rows and columns

Type Parameters
Name Description
T

The type of element in the underlying Source

Fields

Source

The underlying list wrapped by this GridList<T>

Properties

Columns

The number of columns in the grid

InfiniteColumns

Indicates if this grid was configured to have a dynamic number of columns and a fixed number of rows

InfiniteRows

Indicates if this grid was configured to have a dynamic number of rows and a fixed number of columns

Item[GridIndex]

Get the element stored at the given index

Item[int, int]

Get the element stored at the given row and column

Rows

The number of rows in the grid

Methods

Equals

Equality compare

GetColumnIndex

Get the grid column index of the element at sourceIndex

GetRowIndex

Get the grid row index of the element at sourceIndex

ToGridIndex

Convert a 1D index into the underlying list, Source, into a 2D GridIndex for the current grid

ToSourceIndex

Convert a 2D gridIndex into the current grid into a 1D index into Source

Static Methods

CreateWithColumns

Wraps the provided source in a GridList<T> with a dynamic number of rows and a fixed number of columns

CreateWithRows

Wraps the provided source in a GridList<T> with a dynamic number of columns and a fixed number of rows

☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC