I\'m creating the columns of a WPF DataGrid in my C# code. I want one of the columns to stretch to the width of the DataGrid automatically. In XAML
DataGrid
try this
DataGrid1.Width = double.NaN;