Hi
i have create a wpf datagrid with auto generate column as below:
i fill it by a table of database as below:
ProjectDatabaseDataContext db = new ProjectDatabaseDataContext();
dtg_student.ItemsSource = db.tbl_Students;
everything is ok but i want to set the columns header and columns content align to center. i can do this on Windows Form Application but i can't in WPF application.please help me to do it?
thanks

Syed ShanuPosted Jul 15, 2015, 9:20 PM
Check this links hope this will help you.
http://stackoverflow.com/questions/17911159/datagrid-wpf-column-styling-programmatically-not-xaml
https://social.msdn.microsoft.com/Forums/silverlight/en-US/2482cbef-5e1c-4a02-85d9-fa7db2c21df2/how-do-i-set-column-header-horizontal-alignment-programmatically?forum=silverlightcontrols