When the following XAML used, the window size is not 5000x5000, but some small window where the button is cropped.
If the width and height are not specified WPF uses 60% of the width of you primary screen (where the windows is actually displayed) and 60% of its height. This is done by the Application singleton where all Windows ultimately register themselfes.