DataGrid row content vertical alignment

后端 未结 9 907
借酒劲吻你
借酒劲吻你 2020-12-01 00:13

I have a regular DataGrid from WPF 4.0 RTM, where I put data from a database. In order to make clean & light style of DataGrid I use a tall/high rows and by

9条回答
  •  情深已故
    2020-12-01 00:43

    The following code will vertically align the content of a DataGridTextColumn cell:

    
        
    
    

    Edit: I've come back to this problem and found the solution below to work better, it will center the contents of all the cells in DataGridTextRows both horizontally and vertically.

        
        
                
        
    
    

提交回复
热议问题