You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/datagrid/theming-and-styles/style-selectors.md
+4-8Lines changed: 4 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The [.NET MAUI DataGrid]({%slug datagrid-overview%}) component exposes a conditi
13
13
14
14
## Cell Style Selector
15
15
16
-
You can set a different style on a specific cell from a specific column based on custom style-selection logic with the following properties:
16
+
You can set a distinct style to a specific cell in a given column based on custom style-selection logic with the following properties:
17
17
18
18
*`CellContentStyleSelector`(`IStyleSelector`)—Styles the content of the cell by using the text alignment options (`TextMargin`, `HorizontalTextAlignment`, `VerticalTextAlignment`), the font options (`FontAttributes`, `FontFamily`, `FontSize`) and the `TextColor` property.
19
19
*`CellDecorationStyleSelector`(`IStyleSelector`)—Styles the decoration of a cell.
@@ -22,7 +22,7 @@ You can set a different style on a specific cell from a specific column based on
22
22
23
23
## Row Background Style Selector
24
24
25
-
You can set a different style on a row, alternate row, and on row details based on custom style-selection logic by using the `RowBackgroundStyleSelector` (`IStyleSelector`) property.
25
+
You can set a different style on a row, an alternate row, and on row details based on custom style-selection logic by using the `RowBackgroundStyleSelector` (`IStyleSelector`) property.
26
26
27
27
> For the DataGrid Row Background Style Selector example, go to the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and navigate to the **DataGrid > Styling** category.
28
28
@@ -41,9 +41,7 @@ The `CellContentStyleSelector`, `CellDecorationStyleSelector`, `RowBackgroundSty
41
41
42
42
## Example with Cell and Group Style Selectors
43
43
44
-
The following example will demonstrate how to apply the style selectors on the DataGrid cell and group header:
45
-
46
-
Let’s add the DataGrid and set the `CellContentStyleSelector` property as a static resource of type `MyCellContentStyleSelector`, `CellDecorationStyleSelector` as a static resource of type `MyCellDecorationStyleSelector`, and `GroupStyleSelector` as a static resource of type `MyGroupStyleSelector`.
44
+
The following example demonstrates how to apply the style selectors on the DataGrid cell and group header. You will add the DataGrid and set the `CellContentStyleSelector` property as a static resource of type `MyCellContentStyleSelector`, `CellDecorationStyleSelector` as a static resource of type `MyCellDecorationStyleSelector`, and `GroupStyleSelector` as a static resource of type `MyGroupStyleSelector`:
47
45
48
46
**1.** Define the `RadDataGrid` in XAML:
49
47
@@ -83,9 +81,7 @@ This is how the DataGrid control will look when `CellContentStyleSelector` is ap
83
81
84
82
## Example with Row Background Style Selectors
85
83
86
-
The following example will demonstrate how to apply the style selectors on the DataGrid rows, row details and alternate rows:
87
-
88
-
Let’s add the DataGrid and set the `RowBackgroundStyleSelector` property as a static resource of type `MyRowBackgroundStyleSelector`.
84
+
The following example demonstrates how to apply the style selectors on the DataGrid rows, row details, and alternate rows. You will add the DataGrid and set the `RowBackgroundStyleSelector` property as a static resource of type `MyRowBackgroundStyleSelector`:
0 commit comments