A black bar appears around the content of the window when in Maximized states and the project is compiled for .Net4.0.