Back to Devexpress

PropertyGridControl.RowStyle Property

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-9e6f5ee4.md

latest3.2 KB
Original Source

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.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public Style RowStyle { get; set; }
vb
Public Property RowStyle As Style

Property Value

TypeDescription
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:

xaml
<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

AlternationCount

PropertyGridControl Class

PropertyGridControl Members

DevExpress.Xpf.PropertyGrid Namespace