I have simple Window.
In this Window I have Grid with few Rows which height I am setting dynamicly.
Now I want to make Window.Height = sum of Grids Rows.
What a problem seems to be is that Grid itself is filling whole Window (it is ok) but in this grid there is empty space beside area occupied by rows.
What should I do?
For example I have rows witch height= 100 and 200 and whole grid have height 500 but should have 300.
<Window
...
SizeToContent="WidthAndHeight">
<Grid>
...
</Grid>
</Window>
SizeToContent is the property that you want to set. I use this all of the time, it is great.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With