Skip to content

Synctest-hub/How-to-change-checkbox-color-in-DataGridCheckBoxColumn-in-.NET-MAUI-DataGrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

How to change checkbox color in DataGridCheckBoxColumn in .NET MAUI DataGrid?.

This article demonstrates how to change checkbox color in DataGridCheckBoxColumn in .NET MAUI DataGrid.

To change the checkbox color in a DataGridCheckBoxColumn, you can define a custom color using the SfDataGridCheckBoxColor theme key in your application's resource dictionary. This ensures consistent styling across your application. This customization applies globally to all checkboxes in the DataGridCheckBoxColumn. Additionally, ensure that the SfDataGridTheme is set to CommonTheme to enable custom styling for DataGrid.

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <syncTheme:SyncfusionThemeResourceDictionary />
            <ResourceDictionary>
                <x:String x:Key="SfDataGridTheme">CommonTheme</x:String>
                <Color x:Key="SfDataGridCheckBoxColor">Red</Color>
            </ResourceDictionary>
            <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
            <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

You can download this example on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages