BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi George,
Thank you for using Syncfusion products.
We have analyzed your query and found that you have tried to change the background and foreground based on property in ViewModel. For StackedHeaderCellControl, DataContext won’t be a ViewModel class, hence the binding is not working for you. You can change the binding as shown in below code snippet,
Code Snippet:
<Style x:Key="stackedHeaderCellPage1" TargetType="syncfusion:GridStackedHeaderCellControl" BasedOn="{StaticResource stackedHeaderCell}"> <Setter Property="Background" Value="{Binding DataContext.StackedHeaderRowBackgroundColor,RelativeSource={RelativeSource AncestorType=syncfusion:SfDataGrid}}" /> <Setter Property="Foreground" Value="{Binding DataContext.StackedHeaderRowForegroundColor,RelativeSource={RelativeSource AncestorType=syncfusion:SfDataGrid}}" /> </Style> |
Please let us know if you require any further assistance.
With Regards,
Jayapradha