Skip to content

SyncfusionExamples/How-to-bind-dynamic-resources-to-the-DataGridStyle-properties-in-MAUI-DataGrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

How to bind dynamic resources to the DataGridStyle properties in MAUI DataGrid

This demo shows how to bind dynamic resources to the DataGridStyle properties in MAUI SfDataGrid. Using this sample we can bind the color to the DataGridStyle property through dynamic resource as shown in the code snippet.

<ContentPage.Resources>
    <Color x:Key="headerBackground">LightGreen</Color>
</ContentPage.Resources>

<ContentPage.Content>
    <datagrid:SfDataGrid x:Name="dataGrid"
                         ItemsSource="{Binding OrderInfoCollection}">

        <datagrid:SfDataGrid.DefaultStyle>
            <datagrid:DataGridStyle HeaderRowBackground="{DynamicResource headerBackground}"/>
        </datagrid:SfDataGrid.DefaultStyle>
    </datagrid:SfDataGrid>
    
</ContentPage.Content>

About

This demo shows how to bind dynamic resources to the DataGridStyle properties in MAUI SfDataGrid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages