10
votes

Is there a way for me to have the Window of my WPF application resize dynamically with the content? I tried setting the width and height to auto, but no go.

2

2 Answers

17
votes

Set SizeToContent="WidthAndHeight" on the window and the window will dynamically resize based on its content size.

1
votes

Use a resizable control like Grid and put all the controls in Rows/Columns. Also set HorizontalAlignment to stretch for each control inside the Grid.