How to center the content of cells in a data grid?

后端 未结 10 972
春和景丽
春和景丽 2020-12-30 22:58

I set the min height of a datagrid that way:


After feeding the datagrid with datas, the text in each c

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-30 23:23

    Try setting the DataGrid's Vertical and HorizontalContentAlignment to Center

    
    

    If that doesn't work, you can use the solution in this answer. It uses a style that aligns the DataGrid cell contents

提交回复
热议问题