wpf toolkit (Feb 2010) datagrid with MVVM - style reveals name of view model on 'spare column'

Posted by Andy Clarke on Stack Overflow See other posts from Stack Overflow or by Andy Clarke
Published on 2010-06-08T11:42:57Z Indexed on 2010/06/08 11:52 UTC
Read the original article Hit count: 671

Filed under:
|
|
|

Hi,

I've just updated my app with the latest WPF toolkit and I've now got an issue with my styling.

When I bind some data with, for example, two columns to the grid, the spare area at the right shows the name of the ViewModel in the header.

I can understand why, because the data grids data context is the ViewModel and I'm defining my header style as follows ...

<WpfToolkit:DataGridHeaderBorder
    <Border BorderBrush="Blue" BorderThickness="0,1,0,0">
        <TextBlock Text="{Binding}" Margin="4,0,4,0" />
    </Border>
</WpfToolkit:DataGridHeaderBorder>

Do I now need a separate style for the 'spare column' or something?

Can anyone assist please?

Cheers,

Andy

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpftoolkit