Hi,
I've seen these posts :
http://forums.infragistics.com/forums/p/3208/17933.aspx#17933
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=10107
But none of them seem to answer the question of how to modify a single style property with a data trigger while retaining all the other style properties from the theme.
I've set up my trigger within the XamDataGrid.Resources section as follows :
<Style TargetType="{x:Type igDP:DataRecordCellArea}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Record.DataItem.Locked}" Value="True"> <Setter Property="TextBlock.FontWeight" Value="Bold" /> </DataTrigger> </Style.Triggers></Style>
But, although this *does* set the font weight of the DataRecordCellArea according to the Locked property of my data item, it also resets all the style properties to the XamDataGrid defaults, when I want them to stay the same as the theme that's been applied.
Is there a simple way to achieve what I want, or would I have to replicate the theme's DataRecordCellArea style and add the DataTrigger to that new style?
HI,
I am just following up on this forum thread.
If you need further assistance regarding this issue, please let me know. Sincerely, MattDeveloper Support Engineer
Hello,
If you want to retain the setters from the theme, you have to base the style on that there, for example :
BasedOn="{x:Static igThemes:(Grouping)(ThemeName).(ControlName)}".
BasedOn="{x:Static igThemes:EditorsLunaNormal.XamComboEditor}".
You can see more information on how to base a style on the theme in this blog post by Andrew Smith.
(Not entirely sure what's wrong with your post - I can't see anything other than "Hi, " but I got the full text by email)
The style *is* in the XamDataGrid.Resources.