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
240
How to make the selected record FontWeight to Bold?
posted

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

Parents
  • 69686
    Verified Answer
    posted

    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">

                            <Setter Property="FontWeight" Value="Bold"/>

                        </Trigger>

                    </Style.Triggers>

                </Style>

    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.

Reply Children
No Data