I have a standard WPF application with a WPF window and a standard WPF datagrid on it.
The application is meant for use with a touchscreen, so i have changed the properties of the datagrid a bit, in that way that it is optimal for use with those touchscreens. This means that I increased the rowsize, and the font. I added a single & fullrow selection mode.
Now i have a big problem to get my vertical alignment being set in the datagrid. Whatever i try, i don't get it properly set.
When i add a VerticalAlignment property on my CellStyle, I also get some strange behaviour with the selection. All screenshots can be found in the attachment of this post.
I owe a beer to the person who can help me out with this issue!
Thanks in advance to all of you reading this!
Loading

Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 11, 2011, 12:16 AM EDT
In your style file
TargetType="{x:Type DataGridCell}">
CellStyle="{StaticResource Body_Content_DataGrid_Centering}"
ItemsSource="{Binding}"
RowEditEnding="ContentDataGrid_RowEditEnding">
Binding="{Binding Path=Name}" />
Binding="{Binding Path=Location}" />
Please do not forget to mark "Accepted Answer".
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 10, 2011, 12:27 PM EDT
Did you try setting the "VerticalContentAlignment" property?
Please do not forget to mark "Accepted Answer".
roel geusens5 reputationPosted Oct 10, 2011, 10:04 PM EDT
roel geusens5 reputationPosted Oct 11, 2011, 7:16 AM EDT
I owe you a beer! ;-)
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 11, 2011, 7:26 AM EDT