5

I set the system taskbar to autohide, then I ran the WPF application in Maximized state. When the application is in maximized state, I mouse hover the bottom of the screen to view the taskbar but it does not appear. Find the code block below.

<Window x:Class="_189619.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:_189619"

        mc:Ignorable="d" WindowState="Maximized"
        Title="MainWindow" Height="350" Width="525">
    <WindowChrome.WindowChrome>
        <WindowChrome CaptionHeight="50" ResizeBorderThickness="3"/>
    </WindowChrome.WindowChrome>
    <Grid>

    </Grid>
</Window>

Any workaround to show the TaskBar?

Thanks in Advance.

Regards, Priyanga B

Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62
priyanga
  • 61
  • 2
  • If you don't mind a somewhat complicated workaround, I suggest you handle the Window resize as I've described in [the answer to this question](https://stackoverflow.com/questions/46451382/wpf-window-is-under-top-left-placed-taskbar-in-maximized-state/46465322#46465322) and leave a couple of pixels for the TaskBar by modifying the `WmGetMinMaxInfo` method (e.g. `mmi.ptMaxSize.y = Math.Abs(rcWorkArea.bottom - rcWorkArea.top - 5);`). Note: It might be a bit more complicated if you need to account for different TaskBar orientations. – Manfred Radlwimmer Oct 12 '17 at 09:06
  • Thanks for your reply. I have confused with code examples. If possible can you please share the simple sample – priyanga Oct 12 '17 at 11:21
  • Sorry, there is no "simple sample" for this solution. It's a bit complicated but lets you handle edge-cases like yours. – Manfred Radlwimmer Oct 12 '17 at 11:25

0 Answers0