IRows Interface
Definition
Represents a collection of rows in an Avalonia.Controls.ITreeDataGridSource.
public interface IRows
Remarks
Note that items retrieved from an Avalonia.Controls.Models.TreeDataGrid.IRows collection may be reused, so the Avalonia.Controls.Models.TreeDataGrid.IRow should be treated as valid only until the next item is retrieved from the collection.
Methods
| Name | Description |
|---|---|
| GetRowAt | Gets the index and Y position of the row at the specified Y position, if it can be calculated. |
| ModelIndexToRowIndex | Given a model index, returns an index into Avalonia.Controls.Models.TreeDataGrid.IRows. |
| RealizeCell | Realizes a cell model for display on-screen. |
| RowIndexToModelIndex | Given a row index, returns a model index. |
| UnrealizeCell | Unrealizes a cell model realized with Avalonia.Controls.Models.TreeDataGrid.IRows.RealizeCell(Avalonia.Controls.Models.TreeDataGrid.IColumn,int,int). |
GetRowAt Method
Gets the index and Y position of the row at the specified Y position, if it can be calculated.
public ValueTuple<int, double> GetRowAt(double y)
Parameters
y double
The Y position
Returns
ValueTuple<int, double>
A tuple containing the row index and Y position of the row, or (-1,-1) if the row could not be calculated.
ModelIndexToRowIndex Method
Given a model index, returns an index into Avalonia.Controls.Models.TreeDataGrid.IRows.
public int ModelIndexToRowIndex(Avalonia.Controls.IndexPath modelIndex)
Parameters
modelIndex Avalonia.Controls.IndexPath
The model index.
Returns
int
The row index, or -1 if the model index is not displayed.
RealizeCell Method
Realizes a cell model for display on-screen.
public Avalonia.Controls.Models.TreeDataGrid.ICell RealizeCell(Avalonia.Controls.Models.TreeDataGrid.IColumn column, int columnIndex, int rowIndex)
Parameters
column Avalonia.Controls.Models.TreeDataGrid.IColumn
The cell's column.
columnIndex int
The index of the cell's column.
rowIndex int
The index of the cell's row.
Returns
RowIndexToModelIndex Method
Given a row index, returns a model index.
public Avalonia.Controls.IndexPath RowIndexToModelIndex(int rowIndex)
Parameters
rowIndex int
The row index.
Returns
The row index, or an empty path if the row index is not valid.
UnrealizeCell Method
Unrealizes a cell model realized with Avalonia.Controls.Models.TreeDataGrid.IRows.RealizeCell(Avalonia.Controls.Models.TreeDataGrid.IColumn,int,int).
public void UnrealizeCell(Avalonia.Controls.Models.TreeDataGrid.ICell cell, int columnIndex, int rowIndex)
Parameters
cell Avalonia.Controls.Models.TreeDataGrid.ICell
The cell model.
columnIndex int
The index of the cell's column.
rowIndex int
The index of the cell's row.