I am auto generating my columns
<DataGrid Grid.Row="0" AutoGenerateColumns="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="dataGrid1" ItemsSource="{Binding Customers}" />
Now I want to set the size of each column in the code behind , to do something like this
<DataGrid>
<DataGrid.Columns>
<DataGridTextColumn Width="Auto" />
<DataGridTextColumn Width="Auto" />
<DataGridTextColumn Width="*" />
</DataGrid.Columns>
</DataGrid>
I just want to attach to each column "Auto" , and to the last "*" , and everything in code behind.
Thanks.