I have set my main window state to \"Maximized\" but the problem is my application will fill the whole screen even task bar. what am i doing wrong ? I\'m using windows 2008
I wanted the opposite (with WindowStyle=None), but reversing this solution also works for your case:
// prevent it from overlapping the taskbar
// "minimize" it
WindowStyle = WindowStyle.SingleBorderWindow;
// Maximize it again. This time it will respect the taskbar.
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
// app is now borderless fullscreen, showing the taskbar again
What I did for my case:
// make it always overlap the taskbar
// From windowed to maximized without border and window bar
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
// Now the window does not overlap the taskbar
Hide();
Show();
// Now it does (because it's re-opened)