When I tried to align the window about me or in the corner of the screen, I found that there was some kind of gasket between the edge of the screen and the edge of the window. I created a new wpf project from the template, added only two lines in the constructor and got the following:

Why doesn't it come to the edge of the screen? Same issue when I try to put a window in the lower right corner as follows:
Rect workArea = SystemParameters.WorkArea; Left = workArea.Location.X + workArea.Width - Width; Top = workArea.Location.Y + workArea.Height - Height;
It looks like the window has a 7px border (like on win7), but invisible on win10. I also found that if I set both WindowStyle and WindowStyle.None and ResizeMode to ResizeMode.NoResize , the system correctly places the window, but this is not what I need. On win7, the same program works as expected.
From the course, I can set the Left property to -7, but this is not a solution. How can I set the window correctly so that it looks good on both win7 and win10?
source share