Note: The 2 images below show the DataGrid BEFORE being populated.
This was my app's original look:
http://patriot.net/~ramon/misc/With-Simplest-XAML.png
which is accomplished with minimal XAML; the header-populating work is done with C# code. The data source is a List<My_Class>.
<Grid Name="Body" Grid.Row="1" Margin="{StaticResource DefaultMargin}" MinHeight="60" ><DataGrid AutoGenerateColumns="True" Name="dataGrid" Background="White" ColumnHeaderHeight="25" ItemsSource="{Binding ElementName=dataGrid, Path=AutoGenerateColumns}" Margin="{StaticResource DefaultMargin}" /></Grid>
This, however, is the way I like it:
http://patriot.net/~ramon/misc/With-Fancy-XAML.png
It needs fancier XAML support:
<Grid Name="Body" Grid.Row="1" Margin="{StaticResource DefaultMargin}" MinHeight="60" ><DataGrid AutoGenerateColumns="True" Name="dataGrid" Background="White" ColumnHeaderHeight="25" ItemsSource="{Binding ElementName=dataGrid, Path=AutoGenerateColumns}" Margin="{StaticResource DefaultMargin}"><DataGrid.Columns><DataGridTextColumn Binding="{Binding Path=Item}" Header="Item"></DataGridTextColumn><DataGridTextColumn Binding="{Binding Path=ItemName}" Header="Item Name"></DataGridTextColumn><DataGridTextColumn Binding="{Binding Path=TotalHeight}" Header="Total Height"></DataGridTextColumn><DataGridTextColumn Binding="{Binding Path=AGLheight}" Header="AGL Height"></DataGridTextColumn><DataGridTextColumn Binding="{Binding Path=Embedment}" Header="Embedment"></DataGridTextColumn>
[to be continued]