I\'m using the WPF Shell Integration Library to create a custom chrome of my wpf app. All is good, but when maximizing the app, 6 or 7 pixels are out of the screen.
In my project, I have CaptionHeight set to 0 and ResizeMode set to CanResizeWithGrip. This is the code I came up with for the proper thickness.
Thickness maximizeFix = new Thickness(SystemParameters.WindowNonClientFrameThickness.Left +
SystemParameters.WindowResizeBorderThickness.Left,
SystemParameters.WindowNonClientFrameThickness.Top +
SystemParameters.WindowResizeBorderThickness.Top
- SystemParameters.CaptionHeight,
SystemParameters.WindowNonClientFrameThickness.Right +
SystemParameters.WindowResizeBorderThickness.Right,
SystemParameters.WindowNonClientFrameThickness.Bottom +
SystemParameters.WindowResizeBorderThickness.Bottom);
I'm just going to use a border like Joe Castro did and then bind the thickness to a property that I update when the window state changes.
Code seems janky but I haven't found another solution yet.