Set visual style for all SfDataGrids in the application resources

I'm trying to set a theme for all data grids in App.XAML, but receive cyclic reference error:

App.XAML:
<Application x:Class="MyApp"
...
<Application.Resources>
<Style TargetType="syncfusion:SfDataGrid">
            <Setter Property="skinManager:SfSkinManager.VisualStyle" Value="Office2016Colorful" />
</Style>


Error details:
Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
Additional information: 'Initialization of 'Syncfusion.UI.Xaml.Grid.SfDataGrid' threw an exception...

Inner exception:
{"Cyclic reference found while evaluating the Style property on element 'Syncfusion.UI.Xaml.Grid.SfDataGrid'."}

Is it generally possible to set a theme for some controls in the application level?

1 Reply

MJ Mythily Jega Jothi Syncfusion Team August 3, 2018 12:58 PM UTC

Hi Mahdi Ehsanifar,

Thank you for contacting Syncfusion Support.

We could able to see the reported exception in our end. We will check our SfSkinManager and fix the possibility to fix this exception in our source level. We will include this fix in our Volume 3 release which will be available in the end of September.

Please let us know if you require further assistance.

Regards,
Mythily J


Loader.
Up arrow icon