Base property cell type for a given type
Remarks: This is useful when displaying a cell with data of a particular type. It will be used for any row that returns a type with PropertyCell.TypeBinding that is compatible with the specified
T type.Type parameters:
| T | Type of data that this cell type can show |
Properties
Identifier
#Gets the identifier of this type.
Remarks: This is used to cache the cell content so it can be reused for performance reasons. You must ensure that all your cell types have unique identifiers, otherwise the incorrect content control will be used in the grid.
Value: The identifier for this type.
Overrides: PropertyCellType.Identifier
Methods
CanDisplay
#Determines whether this instance can display the specified itemType.
Parameters:
| itemType (object) | Item type. |
Returns:
true if this instance can display the specified itemType; otherwise, false.Overrides: PropertyCellType.CanDisplay
OnConfigure
Configures the content control for the given cell information.
Remarks: When the DataContext changes on a cell, this will be called to configure the cell. You are only required to override this when you are not using MVVM data binding with your controls created by PropertyCellType.OnCreate(CellEventArgs).
Parameters:
| args (CellEventArgs) | Cell arguments |
| control (Control) | Content control that was previously created with the OnCreate method. |
OnCreate
Creates the content control for the cell.
Remarks: The control returned may be reused for other cells, so it is ideal to use MVVM data binding using BindDataContext() methods of your controls. This should return the same control for each row, otherwise the incorrect control may be shown on certain cells.
Parameters:
| args (CellEventArgs) | Cell arguments. |
inherited fromPropertyCellType
Remarks: For platforms like GTK and WinForms which don't support using a custom control per cell, this will be called to paint the content of the cell when it is not in edit mode.
Parameters:
| args (CellPaintEventArgs) | Cell paint arguments. |