# PropertyCell class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public class PropertyCell : CustomCell
```

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

**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 [PropertyCell.TypeBinding](https://eto.picoe.ca/api/type/eto.forms.propertycell/typebinding.md) of each row to determine which [PropertyCellType](https://eto.picoe.ca/api/type/eto.forms.propertycelltype.md) to use from the [PropertyCell.Types](https://eto.picoe.ca/api/type/eto.forms.propertycell/types.md) collection. It calls [PropertyCellType.CanDisplay(object)](https://eto.picoe.ca/api/type/eto.forms.propertycelltype/candisplay.md) on each to find a type that can display based on the value returned. Each [PropertyCellType](https://eto.picoe.ca/api/type/eto.forms.propertycelltype.md) added to the cell must have a unique value for [PropertyCellType.Identifier](https://eto.picoe.ca/api/type/eto.forms.propertycelltype/identifier.md) 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](https://eto.picoe.ca/api/type/eto.forms.propertycelltype.md) 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 [PropertyCellType.OnConfigure(CellEventArgs, Control)](https://eto.picoe.ca/api/type/eto.forms.propertycelltype/onconfigure.md) to update your control when the item/row is changed.

## Constructors

- [PropertyCell](https://eto.picoe.ca/api/type/eto.forms.propertycell/ctor.md): Initializes a new instance of the property cell

## Properties

- [TypeBinding](https://eto.picoe.ca/api/type/eto.forms.propertycell/typebinding.md): Gets or sets the binding to get the type for the
- [Types](https://eto.picoe.ca/api/type/eto.forms.propertycell/types.md): Gets the list of types to use for each cell, in order of preference.

## Methods

- [OnConfigureCell](https://eto.picoe.ca/api/type/eto.forms.propertycell/onconfigurecell.md): Configures an existing cell when it is reused for a different row or the data changes.
- [OnCreateCell](https://eto.picoe.ca/api/type/eto.forms.propertycell/oncreatecell.md): Creates an instance of the control for a cell.
- [OnGetIdentifier](https://eto.picoe.ca/api/type/eto.forms.propertycell/ongetidentifier.md): Gets the identifier of the cell based on its content.
- [OnPaint](https://eto.picoe.ca/api/type/eto.forms.propertycell/onpaint.md): Raises the [PropertyCellType.OnPaint(CellPaintEventArgs)](https://eto.picoe.ca/api/type/eto.forms.propertycelltype/onpaint.md) event.

## Inherited Members

- From [CustomCell](https://eto.picoe.ca/api/type/eto.forms.customcell.md): [ConfigureCell](https://eto.picoe.ca/api/type/eto.forms.customcell/configurecell.md), [CreateCell](https://eto.picoe.ca/api/type/eto.forms.customcell/createcell.md), [GetIdentifier](https://eto.picoe.ca/api/type/eto.forms.customcell/getidentifier.md), [GetPreferredWidth](https://eto.picoe.ca/api/type/eto.forms.customcell/getpreferredwidth.md), [BeginEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/beginedit.md), [CancelEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/canceledit.md), [CommitEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/commitedit.md), [Paint](https://eto.picoe.ca/api/type/eto.forms.customcell/paint.md), [GetCallback](https://eto.picoe.ca/api/type/eto.forms.customcell/getcallback.md), [OnBeginEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/onbeginedit.md), [OnCancelEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/oncanceledit.md), [OnCommitEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/oncommitedit.md), [OnGetPreferredWidth](https://eto.picoe.ca/api/type/eto.forms.customcell/ongetpreferredwidth.md)
- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
