Text alignment in a WPF DataGrid

后端 未结 13 739
野性不改
野性不改 2020-12-14 14:13

How can I align the column data to center in a WPF DataGrid?

13条回答
  •  时光取名叫无心
    2020-12-14 14:20

    +1 for Kent Boogaart. I ended up doing this, which makes the code slightly less cluttered (and enables me to use the alignment on several columns):

    
          
    
    
    
                               
                                   
        // .. other columns        
    
    

提交回复
热议问题