How to change the fontweight of the column title or MyRows.cell

May 16, 2012 at 8:07 PM

Hey

i want the titles to be bold , how can i do that using xaml, or set style in the code.

 

Thank you , please reply this time..

Coordinator
Jun 19, 2012 at 3:54 PM

Since the Title property of the TableViewColumn is just an object then one way to do this is to use Object notation in the XAML and define a TextBlock for the Title property so you can then display the title in whatever way you want. e.g. make the following change in the MainWindow.xaml of TableViewDemo.

<tv:TableViewColumn ContextBindingPath="AAA" >
   <tv:TableViewColumn.Title>
    <TextBlock FontSize="14" FontWeight="Bold">AAAA</TextBlock>
  </tv:TableViewColumn.Title>
</tv:TableViewColumn>