Set the window's property SizeToContent="WidthAndHeight"
. This should help.
Old question but an updated answer:
As @Muad'Dib suggested in his answer :
you should set SizeToContent="WidthAndHeight"
.
If the size of content of window increases more than the screen size, window can overflow from screen. So, you must consider:
MaxWidth="600"
MaxHeight="400"
Well you can't set the window height to auto, to do this you can use a little trick, name the main main grid container, set its height to auto then bind the window height to the height of the main grid
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