This is a migrated thread and some comments may be shown as answers.

Make a cell bold

1 Answer 226 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 20 Jan 2009, 08:40 PM
I want to make the text in certain rows of my grid bold, based on a certain property of my object.  How can I create a style that has a property that I can bind to so that I can achieve this result?  I don't want to change the look at all of the GridViewCell's, just make the text inside of them bold or not bold.

EDIT:   It got it to work by using a DataTrigger.

 
        <Style TargetType="{x:Type GridView:GridViewCell}">  
            <Style.Triggers> 
                <DataTrigger Binding="{Binding Path=HasRead}" Value="False">  
                      <Setter Property="FontWeight" Value="Bold"/>  
                </DataTrigger>                  
            </Style.Triggers>            
        </Style> 

1 Answer, 1 is accepted

Sort by
0
Brandon
Top achievements
Rank 1
answered on 27 Apr 2011, 04:15 PM
Hey, can you give more detail as to how you got this to work???
Thanks!
Tags
GridView
Asked by
Scott
Top achievements
Rank 1
Answers by
Brandon
Top achievements
Rank 1
Share this question
or