When the following XAML used, the window size is not 5000x5000, but some small window where the button is cropped.
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" >
<Button Width="5000" Height="5000">XXX</Button>
</Window>
From what I can tell, size I did not specify the SizeToContent attribute, the default is "Manual", so it will use *size of a window is determined by other properties, including Width, Height, MaxWidth, MaxHeight, MinWidth, and MinHeight. * From the WPF Windows Overview, it seems those other properties are FrameworkElement::MinHeight/Width, and FrameworkElement::MaxHeight. But since the default for the Mins are 0, the Maxs are Infinity and the Width/Height is Nan....what's going on? Where is WPF getting the window size?
Any pointers to the right direction would be appreciated.