I use WindowChrome to customize a Window. When I maximize the Window, then the edges are out of the screen. I use the following code to fix this:
Example of how to increase border thickness when a window is maximised. Otherwise, due to oddities of WindowChrome, part of the border will disappear.
This example also strips out the standard window header, so you have to add your own minimize/maximize/close buttons.