Back to Devexpress

PropertyDefinitionBase.RowTemplate Property

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertydefinitionbase-524ef209.md

latest2.5 KB
Original Source

PropertyDefinitionBase.RowTemplate Property

Gets or sets a template that defines the presentation of rows displayed within the property grid. This is a dependency property.

Namespace : DevExpress.Xpf.PropertyGrid

Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public ControlTemplate RowTemplate { get; set; }
vb
Public Property RowTemplate As ControlTemplate

Property Value

TypeDescription
ControlTemplate

A ControlTemplate object that represents the template which defines the presentation of rows displayed within the property grid.

|

Remarks

Use the RowTemplate property to define the presentation of property grid rows.

The following example demonstrates a property grid row that displays a button.

xaml
<dxprg:PropertyGridControl SelectedObject="{Binding}">
    <dxprg:PropertyDefinition Path="Name"/>
    <dxprg:PropertyDefinition Path="Email">
        <dxprg:PropertyDefinition.RowTemplate>
            <ControlTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="60"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding Path=Value}" Grid.Column="0" VerticalAlignment="Center"/>
                    <Button Content="Write" Grid.Column="1"/>
                </Grid>
            </ControlTemplate>
        </dxprg:PropertyDefinition.RowTemplate>
    </dxprg:PropertyDefinition>
</dxprg:PropertyGridControl>

To learn more, see Appearance Customization.

See Also

PropertyDefinitionBase Class

PropertyDefinitionBase Members

DevExpress.Xpf.PropertyGrid Namespace