How to set WPF window position in secondary display

If you set the window to maximized immediately, it wont work. Use the loaded event and you wont need Windows Forms

var secondaryScreenLeft = SystemParameters.PrimaryScreenWidth - SystemParameters.VirtualScreenWidth;

window.WindowStartupLocation = WindowStartupLocation.Manual;
window.Left = secondaryScreenLeft ;
window.Top = 0;
window.Loaded += Window_Loaded;

private void Window_Loaded(object sender, RoutedEventArgs e)
{
    var senderWindow = sender as Window;
    senderWindow.WindowState = WindowState.Maximized;
}

You need to make sure that the WindowStartupLocation is set to Manual for the form you are displaying

Otherwise nothing you do will have any effect on the position of the window.

using System.Windows.Forms;
// reference System.Drawing
//

Screen s = Screen.AllScreens[1];

System.Drawing.Rectangle r  = s.WorkingArea;
Me.Top = r.Top;
Me.Left = r.Left;

This header of the XAML of the Window I used.

<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="823" WindowStartupLocation="Manual">
    <Canvas Width="743">
        //Controls etc
    </Canvas>
</Window>

I use the following in VS 2019:

private void MaximizeToSecondaryScreen()
{
    this.Left = SystemParameters.VirtualScreenLeft;
    this.Top = SystemParameters.VirtualScreenTop;
    this.Height = SystemParameters.VirtualScreenHeight;
    this.Width = SystemParameters.VirtualScreenWidth;
}

5 years later! But for anyone else that stumbles across this as I did ...

If you can't or do not want to add the entire System.Windows.Forms dll reference, you can use WpfScreenHelper by micdenny (search in NuGet)

  Screen screen = WpfScreenHelper.AllScreens[0];
  Left = screen.Bounds.Left;
  Top = screen.Bounds.Top;
  Width = screen.Bounds.Width;
  Height = screen.Bounds.Height;

Micdenny has ported the Windows Forms Screen helper for WPF. This is excellent when you have other WPF refs that do not play nice with Forms (Like WPF Live-Charts).