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 ShaikhPosted Oct 11, 2011, 4:16 AM
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 ShaikhPosted Oct 11, 2011, 11:26 AM
roel geusensPosted Oct 11, 2011, 11:16 AM
I owe you a beer! ;-)
roel geusensPosted Oct 11, 2011, 2:04 AM
Javeed M ShaikhPosted Oct 10, 2011, 4:27 PM
Did you try setting the "VerticalContentAlignment" property?
Please do not forget to mark "Accepted Answer".