Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
Using a DataTrigger to modify DataRecordCellArea FontWeight when a Theme is applied.
posted

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?