Tell me more ×  So all the questions I've seen so far are about
resizing the columns to the content, but I want to resize the
whole control - the datagrid itself - and change the width (and
height) to be that of the columns - basically so that there's no
wasted space to the right/below. Therefore, of course, if the
data is wider (or taller) than the current size of the datagrid
then I don't want it to expand - only to shrink if required. Is
there a built-in thing for this, or do I have to
programmatically calculate the actual width of each column?  For
example, if I make a dataGrid and set it to Width=200; - but the
content turns out to only take up 150px of width, I want the
dataGrid to then resize to be 150px wide. Of course the grid
will be read only and the user won't be able to resize the
columns, so it would only have to do this at population.
share|improve this question add comment  1 Answer  Why don't u
just set the width/height="Auto" and also set the MinWidth and
MinHeight in that datagrid?  share|