My application starts with WindowStyle set to None, ResizeMode set to NoResize and WindowState to Maximized. I send Windows (Windows 10) into sleep mode and when I wake from sleep mode, the application resizes so the Windows Taskbar is visible. Before being put into sleep mode, the Taskbar is hidden by the application because the WindowStyle is None.
How can I keep the Taskbar behind my application? I've tried catching the SizeChanged event and re-maximizing it, or changing the style to something else and back to None and nothing has worked.
This can be demonstrated with a simple application with a main window like this:
<Window x:Class="MaximizedNoChrome.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MaximizedNoChrome"
mc:Ignorable="d"
Title="MainWindow" WindowState="Maximized" WindowStyle="None" Background="IndianRed">
<Grid>
</Grid>
</Window>