If I create an empty WPF application from the Visual Studio template and set the window sizes to the resolution of my device, when I maximize the window I see a black strip on the right where it appears a scrollbar would be rendered (but is not and should not be). Also see the same on the bottom. Note the title bar is the correct maximized width so I assume this is all client area rendering issues.
I removed the default Grid control that comes with the template, so the XAML here is bare bones. In this case I am targeting a display with resolution 1366x768. Maximize this window in a display set to 1366x768 to see the issue (or change the vals to your display resolution)
Here is the MainWindow.xaml code. The MainWindow.xaml.cs is untouched default template code.
<Window x:Class="TestMaximize.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Width="1366"
Height="768"
MaxWidth="1366"
MaxHeight="768" >
</Window>
What is causing those phantom scrollbar areas and how do I prevent this?
Thanks for any thoughts about this.