Skip to main content
All docs
V25.1
  • 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.v25.1.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