How to set vertical text in the column headers of WPF DataGrid?

前端 未结 2 1364
暖寄归人
暖寄归人 2020-12-11 10:58

Well, actually rotated -90 degrees from horizontal is what I mean.

I need to do this because the text for the header is quite long but the cell value is short, and

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 11:29

    This will rotate the whole ColumnHeaderCell:

    
        
    
    

    Be aware: this means HorizontalContentAlignment is then a VerticalContentAlignment and vice versa.

提交回复
热议问题