Hello,
Did anyone know how to make the selected record font weight to bold?
I using style for the CellValuePresenter and DataRecordPresenter. and use the trigger style IsSelected. but it didn't working.
Here are the code.
<Style x:Key="dataRecordStyle" TargetType="{x:Type igDP:DataRecordCellArea}"> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold"/> </Trigger> <Trigger Property="IsSelected" Value="False"> <Setter Property="FontWeight" Value="Normal"/> </Trigger> </Style.Triggers>
</Style>
First I try using DataRecord for the the targettype, it didn't working. Then I using CellValuePresenter for the targetType. ANd id didn't working also.
Anyone can help me please?
Thanks Before,
Vera
Thanks Alex. It's worked now. :)
Hello Vera,
IsSelected property is True, when you select the Record with the RecordSelector. I believe you want the font to be bolded as you click anywhere inside the record. This is IsActive. The DataRecordPresenter would be an appropriate choise for TargetType for this. Here is the working style:
<Style TargetType="{x:Type igDP:DataRecordPresenter}">
<Style.Triggers>
<Trigger Property="IsActive" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
</Style.Triggers>
If you remove the IsActive trigger, you will notice that the font will be bolded only when you select it with the RecordSelector.
Hope this helps.