ColumnBase.CellStyleSettings Property
Gets or sets style settings applied to a column’s cells.
Namespace: DevExpress.WinUI.Grid
Assembly: DevExpress.WinUI.Grid.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
[DP(null, Handler = "OnCellStyleSettingsChanged")]
public CellStyleSettings CellStyleSettings { get; set; }
#Property Value
Type | Description |
---|---|
Cell |
Style settings applied to a column’s cells. |
#Remarks
CellStyleSettings include the following properties:
Property | Description |
---|---|
Background | Gets or sets a brush that paints a cell’s background. |
Focused |
Gets or sets a brush that paints the focused cell’s background. |
Focused |
Gets or sets a brush that paints the focused cell’s foreground. |
Focused |
Gets or sets a brush that paints a cell’s background when this cell is focused and selected at the same time. |
Focused |
Gets or sets a brush that paints a cell’s foreground when this cell is focused and selected at the same time. |
Font |
Gets or sets a cell’s font family. |
Font |
Gets or sets a cell’s font size. |
Font |
Gets or sets a cell’s font stretch. |
Font |
Gets or sets a cell’s font style. |
Font |
Gets or sets a cell’s font weight. |
Foreground | Gets or sets a brush that paints a row’s foreground. |
Padding | Gets or sets the space between the cell’s borders and its contents. |
Selected |
Gets or sets a brush that paints the selected cell’s background. |
Selected |
Gets or sets a brush that paints the selected cell’s foreground. |
Validation |
Gets or sets a cell validation image for which Error |
Validation |
Gets or sets a cell validation image for which Error |
Validation |
Gets or sets a cell validation image for which Error |
#Example
<dxg:GridControl ItemsSource="{x:Bind ViewModel.Source}"
AutoGenerateColumns="False"
NavigationStyle="Cell"
SelectionMode="CellExtended">
<dxg:GridControl.Columns>
<dxg:GridTextColumn FieldName="ProductName">
<dxg:GridTextColumn.CellStyleSettings>
<dxg:CellStyleSettings FocusedSelectedBackground="Black"
FocusedSelectedForeground="Orange"
Foreground="Red"
SelectedBackground="Blue"
SelectedForeground="LightBlue"/>
</dxg:GridTextColumn.CellStyleSettings>
</dxg:GridTextColumn>
<!-- ... -->
</dxg:GridControl.Columns>
</dxg:GridControl>