WPF DataGrid: Problem with showing DisplayNameAttribute values
Why WPF DataGrid control开发者_JAVA百科 doesn't shows defined DisplayNameAttribute values for grid columns? However this works fine when using Winforms DataGridView!
Thanks a lot ;)
It doesn't work that way in WPF. You could argue it's about maintaining separation of View and Model data.
The easiest way to address your concern is simply defining the column ahead of time; versus setting AutoGenerateColumns
to true.
<toolkit:DataGridTextColumn Header="{x:Static const:Resources.ScriptNameHeader_String}" Binding="{Binding Name}"/>
精彩评论