I have a datagrid which needs to be built dynamically, so I placed an empty data grid in a page (with AutoGenerateColumns=False), then on page.Loaded, I add columns to the datagrid by dg.Columns.Add().
These new columns do not show up in the datagrid.
So I tried adding the datagrid columns in the page xaml, and I gave each column an x:Name attribute, so on page.Loaded I could change the headers, ie: dgTitleHeader.Header="Rank".
The column headers still do not update.