PropertyDefinition.CellTemplate Property

Gets or sets the template that defines the presentation of data cells. This is a dependency property.

Namespace: DevExpress.Xpf.PropertyGrid

Assembly: DevExpress.Xpf.PropertyGrid.v20.1.dll

Declaration

public DataTemplate CellTemplate { get; set; }
Public Property CellTemplate As DataTemplate

Property Value

Type Description
DataTemplate

A DataTemplate object that defines the presentation of data cells.

Remarks

When using CellTemplate note the following:

  • To enable data editing, use an editor shipped with the DevExpress WPF Data Editors Library. The editor's Name must be set to 'PART_Editor'.
  • An in-place editor specified via PropertyDefinition.EditSettings is ignored.

The following example demonstrates how to use the CellTemplate property to specify the required editor for a property grid cell.

<Window ...
        xmlns:dxprg="http://schemas.devexpress.com/winfx/2008/xaml/propertygrid"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" >
    <Window.DataContext>
        <local:ViewModel/>
    </Window.DataContext>
    <Grid>
        <dxprg:PropertyGridControl SelectedObject="{Binding}" ShowCategories="False" ShowMenuButtonInRows="False" ShowProperties="WithPropertyDefinitions" >
            <dxprg:PropertyDefinition Path="Name"/>
            <dxprg:PropertyDefinition Path="Notes">
                <dxprg:PropertyDefinition.CellTemplate>
                    <DataTemplate>
                        <dxe:MemoEdit Name="PART_Editor" MemoTextWrapping="Wrap" PopupWidth="200"/>
                    </DataTemplate>
                </dxprg:PropertyDefinition.CellTemplate>
            </dxprg:PropertyDefinition>
        </dxprg:PropertyGridControl>
    </Grid>
</Window>

To learn more, see Appearance Customization.

See Also