Theme handling in Maui FlexGrid

Posted by: l.balazs on 31 January 2023, 9:13 pm EST

    • Post Options:
    • Link

    Posted 31 January 2023, 9:13 pm EST

    Android: the Maui FlexGrid control keeps its default colors (light) regardless the theme is changed from Light to Dark in the phone. How Can I fix this?



  • Posted 5 February 2023, 8:48 pm EST - Updated 5 February 2023, 8:53 pm EST


    C1 controls are independent of System Themes. You can apply AppThemeBinding accordingly to customize the view in Light or Dark mode.

    Please refer here:

    You can apply AppThemeBinding for Flexgrid too:

            <!-- Dark Theme colors -->
            <Color x:Key="DarkRowBackGround">DarkGray</Color>
            <Color x:Key="DarkAltRowBackGround">LightGray</Color>
            <Color x:Key="DarkPrimaryColor">Black</Color>
            <Color x:Key="DarkForegroundColor">White</Color>
            <c1:FlexGrid x:Name="grid"
                         BackgroundColor="{AppThemeBinding Dark={StaticResource DarkPrimaryColor}}"
                         RowBackground="{AppThemeBinding Dark={StaticResource DarkRowBackGround}}"
                         AlternatingRowBackground="{AppThemeBinding Dark={StaticResource DarkAltRowBackGround}}"
                         RowForeground="{AppThemeBinding Dark={StaticResource DarkForegroundColor}}"
                         ColumnHeaderBackground="{AppThemeBinding Dark={StaticResource DarkPrimaryColor}}"
                         ColumnHeaderForeground="{AppThemeBinding Dark={StaticResource DarkForegroundColor}}"

    Please refer the sample for full implementation:

    Refer the gif for the same:

    As compared to WPF or Winforms, we do not support Themes for C1 MAUI controls directly. However, we have raised an enhancement to support Themes.[Internal Tracking Id - C1XAML-31147]

    Best Regards,


  • Posted 6 February 2023, 5:26 pm EST

    Thank you. It’s clear now.


Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels