0
votes

In WPF, whenever I set WindowState to Maximized, I get a full screen without border. How to get a full screen with border, like the one shown in the image.

This image is of Windows File Explorer(with border) and is only shared to show the borders. It has nothing to do with my application.

I want my WPF window to have similar borders when maximized.

1
My file explorer expands the same as my WPF.. - BugFinder
I shared the File Explorer window just to show windows7 supports 2 types of full screen. One with border and other without Border. Kindly, unplug your monitor adapter and replug to see the difference. - Muralikrishnan Ramanathan
To me this seems not to be an issue with WPF but seems to be an indication of an issue with your Windows 7 installation. (Suggestion: Install a vanilla Windows 7 in a VM, and try your program there and compare the behavior of the vanilla Win7 installation with your current Win7 installation). - user2819245
Set the window height and width to screensize... see: stackoverflow.com/a/2118993/2289942 - Nawed Nabi Zada
@MuralikrishnanRamanathan Im sorry but Im not going to unplug a monitor just because you think your bug will show. - BugFinder

1 Answers

0
votes

because WindowState does not control the border at all. use WindowStyle for that. full screen without border would be WindowStyle.None sounds like you want WindowStyle.SingleBorderWindow