I need to change windows taskbar in my WPF application. For that I set WindowStyle=\"None\", which means to disable the windows taskbar, and make custom taskbar
Solution for WPF
Let's say we want to place the mainWindow of a WPF project at the bottom-right of the screen without it covering the taskBar. We'll write this:
public MainWindow()
{
InitializeComponent();
// set position of window on screen
this.Left = SystemParameters.PrimaryScreenWidth - this.Width;
this.Top = SystemParameters.WorkArea.Bottom - this.Height;
}
this = our object (the MainWindow) We first get to place the left parameter when we subtract our window position (left) from the PrimarySrceenWidth. Than, we do the same to get the most lower point, by subtracting the windows height from the working area of the screen bottom. The working area of the screen does not include the task bar!
enjoy!
Avri