We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Use dynamic values for colors on DataGrid Theme

Thread ID:





146954 Aug 26,2019 08:25 PM UTC Aug 28,2019 01:58 PM UTC Xamarin.Forms 2
Tags: SfDataGrid
Andres Alvarado
Asked On August 26, 2019 08:25 PM UTC

Hi guys. I'm currently using a custom theme for my data grid on the app's resources, based on the documentation.

<x:String x:Key="SfDataGridTheme">CustomTheme</x:String> 
                <Color x:Key="SfDataGridHeaderBackgroundColor">White</Color> 
                <Color x:Key="SfDataGridHeaderForegroundColor">White</Color> 
                <Color x:Key="SfDataGridRecordBackgroundColor">#127ac7</Color> 
                <Color x:Key="SfDataGridRecordForegroundColor">White</Color>
                <Color x:Key="SfDataGridAlternatingRowBackgroundColor">#38a0ed</Color>

This theme works as expected. However, I implemented a Theme selector on my app and now I can use 3 different colors for the controls. Each color is assigned by a resource file

<Style TargetType="NavigationPage">
     <Setter Property="BarBackgroundColor" Value="{DynamicResource NavigationBarColor}"/>
     <Setter Property="BarTextColor" Value="{DynamicResource PrimaryTintColor}"/>

Can you please help me set the properties of the DataGridTheme, similarly to the NavigationPage Style? I can't find any document related to this issue.

Thanks in advance.


Shivagurunathan Kamalakannan [Syncfusion]
Replied On August 27, 2019 02:20 PM UTC

Hi Andres, 
We have checked your code snippet. Currently we are checking the feasibility to set the style for DataGridTheme properties. We will analyze and update you further details on or before 29th August 2019. 
We appreciate your patience until then. 

Shivagurunathan Kamalakannan [Syncfusion]
Replied On August 28, 2019 01:58 PM UTC

Hi Andres, 
Thank you for your patience. 
We have analyzed your query. As of now we don’t have the “Support to set the style properties in XAML”. We have considered to provide this support and logged feature request for the same. We will implement this feature in any of our upcoming release.  
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.    
You can also communicate with us regarding the open features any time using our Feature Report page.     
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal.   
Also, you can apply styling by extending from DataGridStyle class. Please refer the following user guideline for more details. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon