detailView.Columns.OfType<System.Windows.Controls.GridViewColumn>().ToList().ForEach(c => c.Width = c.ActualWidth);
detailView.Columns.OfType<System.Windows.Controls.GridViewColumn>().ToList().ForEach(c => c.Width = Double.NaN);
http://msdn.microsoft.com/en-us/library/system.windows.controls.gridviewcolumn.width.aspx
http://msdn.microsoft.com/en-us/library/system.windows.controls.gridviewcolumn.width.aspx
Double.NaN means auto-size
No comments:
Post a Comment