datagridcolumn

WPF - DataGrid Column with Width=“*”, but MinWidth to Fit Contents

巧了我就是萌 提交于 2019-11-27 02:03:20
问题 What would be the best/right way to have a set of DataGrid columns have proportional width ( Width="\*"), but to have their minimum width be at least the width of their content? At the moment, if I use Width="*" , then the columns stay exactly proportional, but content gets cropped if the columns get too thin. If I use Width="Auto" , then the columns size themselves perfectly to their content, but this makes them all different sizes. What I want is really a combination of the two, like Width=