Wpf – Dynamically resizing a window in Xaml

resizewindowwpfxaml

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.

Best Answer

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