How to control the height of WPF Application window based on the contents of dynamic Grid
I have created a WPF application that generate tiles in the second row of grid. What i'm trying to achieve is to keep rendering tiles in the second row without showing the vertical scroll bar, until unless the height of WPF application crosses the resolution of user screen.
If you want the content to scroll, remove the Height from the RowDefinition of the row that you are adding content to, and put the content inside the ScrollViewer.
Your window might be sizing correctly to the vertical resolution of the screen, but if it's displayed in the center of the screen, it will exceed the height. You can set the startup location to top of the screen with:
If the window height is too high, you might want to set maximum height for your window.