Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PropertyGridControl.RowStyle Property

Gets or sets a style applied to Property Grid rows. This is a dependency property.

Namespace: DevExpress.Xpf.PropertyGrid

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

NuGet Package: DevExpress.Wpf.PropertyGrid

#Declaration

public Style RowStyle { get; set; }

#Property Value

Type Description
Style

A style applied to property grid rows.

#Remarks

Target type: DevExpress.Xpf.PropertyGrid.RowControl

Data context: DevExpress.Xpf.PropertyGrid.RowData

The following code sample demonstrates how to use the RowStyle property:

WPF Property Grid - Row Style

<dxprg:PropertyGridControl ...>
    <dxprg:PropertyGridControl.RowStyle>
        <Style TargetType="dxprg:RowControl">
            <Style.Triggers>
                <Trigger Property="RenderReadOnly" Value="True">
                    <Setter Property="ContentBackground" Value="#122C2C2C"/>
                    <Setter Property="HeaderBackground" Value="#122C2C2C"/>
                </Trigger>
                <Trigger Property="IsCategory" Value="True">
                    <Setter Property="HeaderBackground" Value="LightGray"/>
                    <Setter Property="HeaderForeground" Value="Black"/>
                </Trigger>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="ContentBackground" Value="AliceBlue"/>
                    <Setter Property="ContentForeground" Value="Blue"/>
                    <Setter Property="HeaderBackground" Value="AliceBlue"/>
                    <Setter Property="HeaderForeground" Value="Blue"/>
                </Trigger>
                <DataTrigger Binding="{Binding Header}" Value="BirthDate">
                    <Setter Property="FontStyle" Value="Italic"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </dxprg:PropertyGridControl.RowStyle>
</dxprg:PropertyGridControl>

You can use the PropertyGridControl.RowStyleSelector property to apply row styles based on custom logic.

Refer to the following help topic for more information on appearance properties: Appearance Customization.

See Also