标签:inf 内容 pre 图片 col image get highlight 控件
实现效果:

知识运用:
DataGridViewCellStyle类的Alignment属性 //获取或设置DataGridView单元格内的单元格内容的位置
public DataGridViewContentAlignment Alignment {get; set;} // 设置控件列的DefaultCellStyle.Alignment属性来完成

实现代码:
dataGridView1.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
标签:inf 内容 pre 图片 col image get highlight 控件
原文地址:https://www.cnblogs.com/feiyucha/p/10203898.html