Shiny.Maui.TableView uses a cascading style system. Properties set on the TableView apply globally to all cells and sections. Section-level properties override global values. Cell-level properties override both.
TableView (global defaults)
└─ TableSection (section overrides)
└─ Cell (cell-level overrides)
When a property is null or -1 at any level, it falls through to the next level up. If no value is set anywhere, the platform default is used — which means dark mode works automatically without hardcoded colors.
< tv:TableView CellTitleColor = "#333333"
CellDescriptionColor = "#888888"
CellValueTextColor = "#007AFF"
CellBackgroundColor = "White"
CellSelectedColor = "#EFEFEF"
CellAccentColor = "#007AFF"
HeaderTextColor = "#666666"
HeaderBackgroundColor = "#F2F2F7"
FooterTextColor = "#8E8E93"
SeparatorColor = "#C6C6C8" >
< tv:TableSection Title = "Styled Section" >
<!-- This cell uses global styles from TableView -->
< tv:LabelCell Title = "Default Styled" ValueText = "Inherits" />
<!-- This cell overrides the title color -->
< tv:LabelCell Title = "Custom Color"
Set these on the TableView to apply to all cells:
Property Type Description CellTitleColorColor?Title text color CellTitleFontSizedoubleTitle font size CellTitleFontFamilystring?Title font family CellTitleFontAttributesFontAttributes?Title styling (Bold, Italic, None)
Property Type Description CellDescriptionColorColor?Description text color CellDescriptionFontSizedoubleDescription font size CellDescriptionFontFamilystring?Description font family CellDescriptionFontAttributesFontAttributes?Description styling
Property Type Description CellHintTextColorColor?Hint text color CellHintTextFontSizedoubleHint font size CellHintFontFamilystring?Hint font family CellHintFontAttributesFontAttributes?Hint styling
Property Type Description CellValueTextColorColor?Value text color (for LabelCell, CommandCell, etc.) CellValueTextFontSizedoubleValue font size CellValueTextFontFamilystring?Value font family CellValueTextFontAttributesFontAttributes?Value styling
Property Type Description CellBackgroundColorColor?Cell background color CellSelectedColorColor?Background color when tapped CellAccentColorColor?Accent color for switches, checkboxes, and radios
Property Type Description CellIconSizedoubleIcon dimensions (width and height) CellIconRadiusdoubleIcon corner radius (default: 6)
Property Type Description CellPaddingThickness?Cell content padding CellBorderColorColor?Cell border color CellBorderWidthdoubleCell border width CellBorderRadiusdoubleCell border corner radius
Property Type Default Description HeaderBackgroundColorColor?nullHeader background HeaderTextColorColor?nullHeader text color HeaderFontSizedouble— Header font size HeaderFontFamilystring?nullHeader font family HeaderFontAttributesFontAttributesBoldHeader styling HeaderPaddingThickness14,8,8,8Header padding HeaderHeightdouble— Fixed header height HeaderTextVerticalAlignLayoutAlignmentEndVertical alignment
Property Type Default Description FooterTextColorColor?nullFooter text color FooterFontSizedouble— Footer font size FooterFontFamilystring?nullFooter font family FooterFontAttributesFontAttributes— Footer styling FooterPaddingThickness14,8,8,8Footer padding FooterBackgroundColorColor?nullFooter background
Property Type Default Description SeparatorColorColor?nullLine color between cells SeparatorHeightdouble0.5Separator thickness SeparatorPaddingdouble16Separator left inset ShowSectionSeparatorbooltrueShow gap between sections SectionSeparatorHeightdouble8Gap height between sections SectionSeparatorColorColor?nullGap color
The style system supports dark mode automatically. When cell and section properties are left at their defaults (null), MAUI uses the system’s current theme colors.
To support dark mode properly:
Do not hardcode colors on cells unless you need specific branding
Use null (the default) to let the platform choose appropriate colors
If you must set colors, use AppThemeBinding in XAML:
< tv:TableView CellTitleColor = "{AppThemeBinding Light=#333333, Dark=#EEEEEE}"
CellBackgroundColor = "{AppThemeBinding Light=White, Dark=#1C1C1E}"
HeaderBackgroundColor = "{AppThemeBinding Light=#F2F2F7, Dark=#2C2C2E}" >
Any cell can override global styles by setting properties directly:
< tv:TableView CellTitleColor = "Black" CellTitleFontSize = "16" >
< tv:TableSection Title = "Mixed Styles" >
<!-- Uses global: black title, 16pt -->
< tv:LabelCell Title = "Default" />
<!-- Overrides: red title, 20pt bold -->
< tv:LabelCell Title = "Highlighted"
TitleFontAttributes = "Bold" />
<!-- Overrides just color, inherits 16pt from global -->
< tv:LabelCell Title = "Subtle"
Add borders to individual cells or globally:
<!-- Global borders on all cells -->
< tv:TableView CellBorderColor = "#E0E0E0"
<!-- Per-cell border override -->
< tv:CommandCell Title = "Important Action"