wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-9e6f5ee4.md
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
public Style RowStyle { get; set; }
Public Property RowStyle As Style
| Type | Description |
|---|---|
| Style |
A style applied to property grid rows.
|
Target type: DevExpress.Xpf.PropertyGrid.RowControl
Data context: DevExpress.Xpf.PropertyGrid.RowData
The following code sample demonstrates how to use the RowStyle property:
<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