Click or drag to resize

PropertyCell Class

A custom cell implementation that implements a generic method of showing different types of controls on a per row basis.
Inheritance Hierarchy

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public class PropertyCell : CustomCell

The PropertyCell type exposes the following members.

Constructors
  NameDescription
Public methodPropertyCell
Initializes a new instance of the property cell
Top
Properties
  NameDescription
Public propertyTypeBinding
Gets or sets the binding to get the type for the
Public propertyTypes
Gets the list of types to use for each cell, in order of preference.
Top
Methods
Remarks
This is ideal for things like showing a property grid to edit various properties of an object. The way this works is by using the TypeBinding of each row to determine which PropertyCellType to use from the Types collection. It calls CanDisplay(Object) on each to find a type that can display based on the value returned. Each PropertyCellType added to the cell must have a unique value for Identifier to ensure the correct control is shown in the cell. The identifier is used to cache the content controls generated by the PropertyCellType when displaying the same value for other rows while scrolling. Ideally, the content control generated from the PropertyCellType should use MVVM BindDataContext() methods for its children so that they are updated automatically when reused for different controls. This is not a requirement, however you must then implement/override the OnConfigure(CellEventArgs, Control) to update your control when the item/row is changed.
See Also