Inside the obj folder of your project there will be a *.g.cs file for your xaml file - Most of what you are looking for will proably be there.
To add a column at runtime do the following:
DataGridTextColumn textColumn = new DataGridTextColumn();
dataColumn.Header = "First Name";
dataColumn.Binding = new Binding("FirstName");
dataGrid.Columns.Add(textColumn);
Update
DataGridTemplateColumn col = new DataGridTemplateColumn();
col.Header = "Date";
FrameworkElementFactory factory =
new FrameworkElementFactory(typeof(DatePicker));
Binding b = new Binding("Date");
b.StringFormat = "d";
factory.SetValue(DatePicker.SelectedDateProperty, b);
DataTemplate cellEditingTemplate = new DataTemplate();
cellEditingTemplate.VisualTree = factory;
col.CellEditingTemplate = cellEditingTemplate;
Best regards
Espen Harlinn